开发者

ASP.net Crystal Reports Print issue

开发者 https://www.devze.com 2023-01-29 11:08 出处:网络
We have 3 Cr开发者_如何学编程ystal reports developed in VS.net 2008. The input parameter for all the 3 reports are same.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消