Hello Experts,
I've to export the Developed SSRS report (with DP,Contract & UI builder class) to Excel without opening report Screen, But user has to have the option for selecting the Parameters from the parameter window.
* I tried below code but this code is not showing the parameters except the default(Print setting, etc..) parameters.
* And also it is not considering my UI builder class.
** So please share your idea/code snippet to open the SSRS parameter window with all the parameters including UI builder overrided parameters for user selection and export the final result to Excel without showing Report screen.
SrsReportRunController controller = new SrsReportRunController();
saInstrumentVariantMovesTmpContract rdpContract = new saInstrumentVariantMovesTmpContract();
SRSPrintDestinationSettings settings;
// Define report and report design to use
controller.parmReportName(ssrsReportStr(saInstrumentVariantMovesReport,PrecisionDesign));
// Use execution mode appropriate to your situation
controller.parmExecutionMode(SysOperationExecutionMode::Synchronous);
// Suppress report dialog
controller.parmShowDialog(true);
// Explicitly provide all required parameters
rdpContract.parmStatus("Ready");
controller.parmReportContract().parmRdpContract(rdpContract);
// Change print settings as needed
settings = controller.parmReportContract().parmPrintSettings();
settings.printMediumType(SRSPrintMediumType::File);
settings.fileFormat(SRSReportFileFormat::Excel);
settings.overwriteFile(true);
settings.fileName(@'C:\Users\John\Desktop\111.xlsx');
// Execute the report
controller.startOperation();