/// <summary> /// To handle the report design to print based on caller /// </summary> [ExtensionOf(classStr(SalesInvoiceController))] final class SalesInvoiceController_MY_Extension { /// <summary> /// choose report design /// </summary> protected void outputReport() { Args controllerArgs = this.parmArgs(); SRSCatalogItemName reportDesign; if((controllerArgs.menuItemName() == menuItemOutputStr(SalesInvoice_CUSTOM)) || custInvoiceJour.isProforma() || (controllerArgs.menuItemName() == menuItemOutputStr(SalesInvoice))) { reportDesign = ssrsReportStr(SalesInvoice_Custom,Report_Custom); } else { reportDesign = ssrsReportStr(SalesInvoice_Custom,Report); } this.parmReportName(reportDesign); this.parmReportContract().parmReportName(reportDesign); SRSPrintDestinationSettings srsPrintDestinationSettings = formLetterReport.getCurrentPrintSetting().parmPrintJobSettings(); SRSPrintMediumType srsPrintMediumType = srsPrintDestinationSettings.printMediumType(); formletterReport.parmReportRun().settingDetail().parmReportFormatName(reportDesign); if (srsPrintDestinationSettings.printMediumType() == SRSPrintMediumType::File) { srsPrintDestinationSettings.fileName(custInvoiceJour.InvoiceId); } srsPrintDestinationSettings.overwriteFile(true); next outputReport(); }
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
Wednesday, November 16, 2022
SalesInvoice change file name when using print management with File DocumentType
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment