24 Aprilie 2009 de liviustoica55
Changing paper trays is possible in AX even in The Fetch of a report. You do this by changing the properties of the printJobSettings class. There are 3 minor issues.
1 It only works for printers defined on the client.
2 You Can only switch the tray once
3 It will not work when you first print to screen and then to de printer.
pjs = reportRun.printJobSettings();
pjs = element. printJobSettings();
for (q = pjs.getNumberOfTrays(); q > 0; q–)
info(int2str(q) + " – " + int2str(pjs.getTray(q));
pjs.paperTray(pjs.getTray(q)); //Note the internal tray number can be different than the external number.