0
votes

We have 3 Crystal 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

1
Do you already know how to print 1 report from a button click and need to know how to do 3 at once, or do you need to know how to print at all from a button click?RogerG

1 Answers

0
votes

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.