How to control printer orientation(Landscape / Portrait) for an AX report in X++

You should try this:

1. Set property Orientation on your report design to Auto

2. In your fetch method on report add following code (you can add some conditions to determine proper orientation )

element.printJobSettings().preferredOrientation(PrinterOrientation::Portrait);

element.printJobSettings().fitToPage(false);

posted @ 2015-02-04 16:00  AndyTai  Views(382)  Comments(0Edit  收藏  举报