Print SSRS Report Twice ?

Hi All ,

I had created a simple SSRS report ( usind RDP , controller , contract classes ) wich display some information about Product , the Class Controller take selected Record as Args , and the the report is printed , i would now to print the report twice in the same time , i mean i want to select two records and pass theme to Class Controller , and the when printing , the report Viewer is Open twice , one for each Product, how i can do it ?

Thak you for help.

Thanks

Taoufiq

You have to run your report from the code twice, for each record:

controller = new YourSrsReportController();

controller.parmReportName(ssrsReportStr(YourReportName, YourReportDesignName));

rdpContract = new YourRdpContract();

controller.parmReportContract().parmRdpContract(rdpContract);

srsPrintDestSettings = new SRSPrintDestinationSettings();

controller.parmReportContract().parmPrintSettings(srsPrintDestSettings);

srsPrintDestSettings.printMediumType(SRSPrintMediumType::Screen);

controller.parmShowDialog(false);

// Execute the report for the first record.

rdpContract.parmXXX(yourParameterValue for the first record);

args = new Args();

args.record(yourRecord1);

controller.parmArgs(args);

controller.startOperation();

// Execute the report for the second record.

rdpContract.parmXXX(yourParameterValue for the second record);

args.record(yourRecord2);

controller.parmArgs(args);

controller.startOperation();