Hello,
I try to change the file name for pdf invoices. I tried with printsettings but names are not changes still all files are 'show invoice'
Im using D365 FO. I put it in DP_EXT, maybe I should do it somewhere else ? WHen i put it into controller class report dont generate.
[ExtensionOf(classStr(PSAProjInvoiceDP))] final class PSAProjinvoiceDP_Extension { public static void main(Args _args) { SrsReportRunController controller = new SrsReportRunController(); SysUserLicenseCountRDPContract rdpContract = new SysUserLicenseCountRDPContract(); SRSPrintDestinationSettings settings; // Define report and report design to use controller.parmReportName(ssrsReportStr(PSAProjInvoiceSZM, PrecisionDesign1)); // Use execution mode appropriate to your situation controller.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch); // Suppress report dialog controller.parmShowDialog(false); // Explicitly provide all required parameters rdpContract.parmReportStateDate(systemDateGet()); controller.parmReportContract().parmRdpContract(rdpContract); // Change print settings as needed settings = controller.parmReportContract().parmPrintSettings(); settings.printMediumType(SRSPrintMediumType::File); settings.fileFormat(SRSReportFileFormat::PDF); settings.fileName('Invoice.pdf'); // Execute the report controller.startOperation(); }