Hi folks, I need to run a batch job that passing the customer account to the SSRS report Dynamically...and this will write a PDF file per customer.
So I believe I need to call the controller class something like this:
But not sure how to pass the parameter to the report. The parameter is not in the contract class. Can't I just pass the parameter to the report by modifying the query range rather than adding the parameter to the contract class?
Thank you in advance...
SrsReportRunController controller = new SrsReportRunController();
SRSPrintDestinationSettings printSettings;
// set report name
controller.parmReportName(ssrsReportStr(AMKcustsevenDayOpen, Report));
controller.parmArgs().parm('custaccount?');
// get print settings from contract
printSettings = controller.parmReportContract().parmPrintSettings();
// set print medium
printSettings.printMediumType(SRSPrintMediumType::File);
printSettings.fileFormat(SRSReportFileFormat::PDF);
printSettings.overwriteFile(true);
printSettings.fileName(@"C:\Temp\Report.pdf");
// suppress the parameter dialog
controller.parmShowDialog(true);
// start operation
controller.startOperation();
*This post is locked for comments