ASP.net Crystal Reports Print issue
We have 3 Cr开发者_如何学编程ystal reports developed in VS.net 2008. The input parameter for all the 3 reports are same.
Is there anyway we can print all 3 reports at once on button click from ASP.net page.
Please help
You can generate three reports, and print them sequentially.
ReportDocument rptDocument = new ReportDocument();
// Load report.
rptDocument.Load(Server.MapPath("reportNameOrPath"));
// Set report parameters is exist.
ParameterFields parameterFields = new ParameterFields();
ParameterField parameterField = null;
ParameterDiscreteValue parameterValue = null;
...
// 0, 0: to print all the pages.
this.RptDocument.PrintToPrinter(1, false, 0, 0);
You can wrap this code in a method which accept reportNameOrPath as a parameter, and call it for each report.
精彩评论