Notifications
Announcements
No record found.
Hi, any tips on how to control print orientation(Landscape / Portrait) for an AX report in X++ . Thanks in Advance, Santosh.
*This post is locked for comments
What's your AX version? Is 2009 and earlier with the legacy reporting engine og 2012 with SSRS engine?
With 2009 and earlier look for the PrintJobSettings class.
thanks for the reply Palle, using the PrintJobSettings class i am able to control the print orientation for an out-of-box report, but what about for the custom AX reports ?
In my case, i have a custom AX report set-up for SalesOrder Invoice.
Thanks,
Santosh.
Hi Santosh,
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);
Dusan
Hi Palle,
Mine issue is different. Check below.
We have modified some SSRS reports to print A4 Landscape. The reports are 'Ledger Transactions List' and 'Trial Balance' (both found in General Ledger -> Reports -> Transactions).
I have attached a screenshot (TB.jpg) of the modifications made to the Trial Balance Report (LedgerTrialBalance). This report has four designs - all four designs have been modified.
As you can see, we have set the Page Setup on the Report Properties to 'A4' Paper, Orientation 'Landscape'.
When I print the report from within the AX client (see attached TB_settings.jpg), the report appears to be formatted for Landscape but actually prints out in Portrait.
If I print it to an XPS printer (Microsoft XPS Document Writer - orientation Landscape, paper A4) I get the same result - it prints out in Portrait.
I have attached the XPS file that is produced (TB_xps.xps)- to best view the problem, zoom out so you can see the whole page. What is produced in the XPS file matches exactly what happens when I print it to a physical printer.
How can I get these reports to actually print in Landscape?
Any suggestions for this issue will be appreciated.
Regards,
Zahir
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2