In trực tiếp từ D365FO ra máy in


17/03/2020- duocnt    863 Views    


Điều kiện:

  1. Máy in phải được cấu hình vào D365FO bằng Document Routing Agent.
  2. Sau khi cấu hình, máy in phải được Active.



Code X++.

    public static void main(Args _args)
   {       
        SrsReportRunController reportRunController = new SrsReportRunController();
                reportRunController.parmReportName(ssrsReportStr(RsVnCompanyLogoReport,PrecisionDesign1));
                reportRunController.parmDialogCaption("Print CREDIT NOTE");
                _args.menuItemType(MenuItemType::Output);
                _args.menuItemName(identifierStr(RsVnCompanyLogoMenuItem));
                reportRunController.parmArgs(_args);
                reportRunController.parmLoadFromSysLastValue(false);
                reportRunController.parmShowDialog(false);
                reportRunController.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::Printer);
        SysCorpNetPrinters netPrinters;
        select firstonly netPrinters
        where netPrinters.PrinterName == "RICOH Printer (Old Office)" && netPrinters.Active == NoYesCombo::Yes ;
                reportRunController.parmReportContract().parmPrintSettings().printerName(netPrinters.PrinterName);
                reportRunController.parmExecutionMode((SysOperationExecutionMode::Synchronous));
                reportRunController.startOperation();
        info("Printed");
    }

Góp ý kiến

;
;