Friday, April 1, 2011

How to call Print JobSettings using a button

Adding Print Job Settings to a button on your form in microsoft dynamics AX On the click event of the button you need to write the code:

Args args = new Args(reportstr(POSReciept));
PrintJobSettings printJobSettings;
ReportRun reportRun;
;
printJobSettings = new PrintJobSettings();
printJobSettings.SetTarget(PrintMedium::Printer); printJobSettings.suppressScalingMessage(true);

reportRun = new ReportRun(args);
reportRun.setTarget(PrintMedium::Printer);
reportRun.init(); reportRun.run();

No comments:

Post a Comment