AX:打印报告,带有设置,纸盒

时间:2016-02-11 13:54:42

标签: axapta dynamics-ax-2012 x++

我试图从代码中修改一些设置 我读了一些关于它的帖子,比如这个HOW TO: TechNet

我可以检索托盘信息,例如

info( strFmt("Tray1  %1     %2", printJobSettings.getTray(1),  printJobSettings.getTrayName(1) ));
info( strFmt("Tray2  %1     %2", printJobSettings.getTray(2),  printJobSettings.getTrayName(2) ));
info( strFmt("Tray3  %1     %2", printJobSettings.getTray(3),  printJobSettings.getTrayName(3) ));

有了这个结果
enter image description here

但是当我尝试从TechNet执行此代码时

public static void main(Args _args){
SrsReportRunController controller = new SrsReportRunController();
SRSPrintDestinationSettings printSettings;

controller.parmReportName(ssrsReportStr(Report1, Design1));
printSettings = controller.parmReportContract().parmPrintSettings();
printSettings.printMediumType(SRSPrintMediumType::Printer);
printSettings.printerName('KONICA MINOLTA C3110 PS');
printSettings.printLandscape(true);
printSettings.numberOfCopies(1);
printSettings.setPaperTray(1);
printSettings.collate(true);

controller.parmShowDialog(true);
controller.startOperation();
}

我收到此消息:
enter image description here

更新:我忘了说,我已经测试了每个托盘。

感谢您的帮助

0 个答案:

没有答案