Hi,
I have created SSRS report which will create excel directly on report generation. but after excel generated the page is not closing and shows a blank page. It should redirect to home page after excel is generated.
Please find the below code for reference.
public final class OrderBookReportController extends SrsReportRunController implements BatchRetryable{ SRSPrintDestinationSettings printDestinationSetting; /// <summary> /// Main method /// </summary> /// <param name = /_args/>args</param> public static void main(Args _args) { NAVOrderBookReportController controller = new OrderBookReportController(); controller.parmReportName(ssrsReportStr(OrderBookReport,Report)); controller.parmArgs(_args); controller.parmShowDialog(false); controller.startOperation(); //FormRun fr= _args.caller(); // fr.close(); // _args.caller().close(); } protected void preRunModifyContract() { printDestinationSetting = new SRSPrintDestinationSettings(); printDestinationSetting.printMediumType(SRSPrintMediumType::File); printDestinationSetting.fileName(System.IO.Path::GetTempPath() +/OrderBookReport.XLSX/); printDestinationSetting.fileFormat(SRSReportFileFormat::Excel); printDestinationSetting.overwriteFile(true); this.parmReportContract().parmPrintSettings(printDestinationSetting); }}
Please suggest.
Thanks,
Priya