Click here to Skip to main content
14,207,305 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
i have this code
using System;
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Collections;
using System.Printing;
using System.Printing.Activation;
using System.Windows.Forms;
using System.Web.UI;
using Microsoft.Reporting.WinForms;
using Microsoft.ReportingServices;
using Microsoft.CSharp;
namespace nancymoneytrs
{
    public partial class AccountDetail : System.Web.UI.Page
    {
        string reportPath = "repTransfer.rdlc";
        
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        #region
        protected void ButtonPrint_Click(object sender, EventArgs e)
        {
            ReportViewer rView = new ReportViewer();
            rView.Dock = DockStyle.Fill;
            rView.LocalReport.ReportPath = reportPath;
            rView.Print();
            
        }
        protected void Calendar3_SelectionChanged(object sender, EventArgs e)
        {
        }
        #endregion
    }
}}


my problem is in rView.Print();
or what syntax needed to run

please fix it .

thanks
Posted

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Print is an event that occurs when the user prints the report. What do you wish to do? Do you wish to display the report in the report viewer. If so here is a sample

http://msdn.microsoft.com/en-us/library/ms252073(v=vs.80).aspx[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.190612.1 | Last Updated 28 Oct 2011
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100