Below is the X++ code to print sales invoice on printer directly.     Args          salesArgs = new Args();      SalesInvoiceContract  salesInvoiceContract;      SalesInvoiceController controller;      SrsReportRunImpl    srsReportRunImpl;      str fileName;      CustInvoiceJour     custInvoiceJour;// = _args.record();        select custInvoiceJour where custInvoiceJour.InvoiceId=="INV_00000009";      salesArgs.record(custInvoiceJour);      controller       = new SrsReportRunController();      salesInvoiceContract  = new SalesInvoiceContract();      controller.parmReportName(ssrsReportStr(SalesInvoice,Report));      controller.parmShowDialog(false);      controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::Printer);      // controller.parmReportContract().parmPrintSettings().printerName(@"\\espprn03\Follow Me - MFP");      salesInvoiceContract.parmRecordId(custInvoiceJour.RecId); // Record id must be passed otherwise the report wi...
Technical Tutorials x++,tips on issues or troubleshooting On Ax ERP ,Microsoft Dynamics 365,Ax 2012,Microsoft , U.S.,Business Software solution.