We are facing a huge delay while printing a report directly to the printer. It looks like a slow network issue.
So my question is when print a report, does the print job goes from AOS machine or from SSRS machine to the target printer?
We are using the following code in controller to print directly to printer:
srsPrintDestSettings = formletterReport.parmReportRun().settingDetail().parmPrintJobSettings();
srsPrintDestSettings.printMediumType(SRSPrintMediumType::Printer);
srsPrintDestSettings.printerName(sysCorpNetPrinters.PrinterName);
srsPrintDestSettings.fileFormat(SRSReportFileFormat::PDF);
srsPrintDestSettings.printerWhere(sysCorpNetPrinters.PrinterPath);
srsPrintDestSettings.numberOfCopies(1);
srsPrintDestSettings.collate(false);
srsPrintDestSettings.printOnBothSides(SRSReportDuplexPrintingSetting::None);
srsPrintDestSettings.printAllPages(true);
srsPrintDestSettings.fromPage(0);
srsPrintDestSettings.toPage(0);
srsPrintDestSettings.pack();
this.parmReportContract().parmPrintSettings(srsPrintDestSettings);
formletterReport.parmUsePrintMgmtDestinations(false);
formletterReport.parmUseUserDefinedDestinations(false);
printMgmtPrintSettingDetail = formletterReport.parmReportRun().settingDetail();
printMgmtPrintSettingDetail.parmPrintJobSettings(srsPrintDestSettings);
printMgmtPrintSettingDetail.pack();
In our case the print button is enabled only for once and disabled after that so that user cannot print more than once that is why it is being directly sent to printer otherwise user can print multiple times from PDF viewer of D365FO.
One option is that if we let the report to be opened in PDF viewer, can we disable the print button of pdf viwer after the first print.
