how to find crystal report printing count?
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; usin开发者_如何学Cg 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.
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.
精彩评论