0
votes

I am using Crystal Report 2010 with C#, have a WinForm and want to show Page N of M to user in a Labelwhile printing crystal repots. How can I impelemnt that?

the code I implemented in ReportViewer:

using System; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Windows.Forms; using CrystalDecisions.Web;

namespace ComboSearch.Reports { public partial class ReportViewer : System.Web.UI.Page {

        ReportDocument rpt = new ReportDocument();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string path = Server.MapPath("Employee.rpt");
            rpt.Load(path);
            CrystalReportViewer1.ReportSource = rpt;                
        }
    }
}

} Thanks in advance.

1
retagged it for you. You should get an answer back quicker now. - PowerUser

1 Answers

0
votes

Showing "Page N of M", while printing report can be done by inserting that as a field to the report itself, and position it upon your requirement.

To insert it, use special fields option to insert "Page N of M" field.