Announcements
No record found.
[ExtensionOf(classStr(SalesInvoiceController))] internal final class SalesInvoiceController_Class_Extension { static void PrintSalesInvoiceReportToPrinter(Args _args) { SRSPrintDestinationSettings settings; SalesTable salesTable; SysCorpNetPrinters sysCoprNetPrinters; CustInvoiceJour custInvoiceJour; SrsReportRunController controller = new SrsReportRunController(); SalesInvoiceContract salesInvoiceContract = new SalesInvoiceContract();; controller.parmReportName(ssrsReportStr(SalesInvoice, Report)); controller.parmShowDialog(false); controller.parmArgs(_args); custInvoiceJour = _args.record(); select firstonly OutputType from salesTable where salesTable.SalesId == custInvoiceJour.SalesId; select firstonly PrinterName, PrinterPath from sysCoprNetPrinters where sysCoprNetPrinters.Active == NoYesCombo::Yes; if(salesTable.OutputType == "PDF" && sysCoprNetPrinters.PrinterName) { // Change print settings as needed settings = controller.parmReportContract().parmPrintSettings(); settings.printMediumType(SRSPrintMediumType::Printer); settings.printerName(sysCoprNetPrinters.printerName); settings.printerWhere(sysCoprNetPrinters.PrinterPath); settings.numberOfCopies(1); settings.printAllPages(true); salesInvoiceContract.parmRecordId(custInvoiceJour.RecId); controller.parmReportContract().parmRdpContract(salesInvoiceContract); // Execute the report controller.startOperation(); } } public static void main(Args _args) { if(_args.record()) { SalesInvoiceController::PrintSalesInvoiceReportToPrinter(_args); } next main(_args); } }
srsPrintDestinationSettings.collate(false); srsPrintDestinationSettings.printOnBothSides(SRSReportDuplexPrintingSetting::None); srsPrintDestinationSettings.printAllPages(true); srsPrintDestinationSettings.fromPage(0); srsPrintDestinationSettings.toPage(0);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 536 Most Valuable Professional
André Arnaud de Cal... 320 Super User 2026 Season 2
CU-1234529-002 210