While working with AX 2012, I’ve observed that some reports will not render as expected when a hard copy is printed. With the release of Microsoft Dynamics AX 2012 RTM (6.0.947.0), the report design and delivery platform changed significantly from the previous version. Reporting has shifted away from native X++ reports designed in MorphX to SSRS reports designed in Visual Studio.
This issue appears to affect reports designed with portrait orientation. The affected reports will print to the screen without any problem, but they do not fit to the page properly when sent to a printer. The issue occurs when output is sent to a:
- physical printer connected to a workstation locally
- physical printer connected to a workstation via terminal services
- logical printer (e.g. PDF or XPS format)
For demonstrative purposes, I’ve chosen the chart of accounts report. When printed to the screen, this report displays properly.
However, when it is sent to a printer, it spills over to 2 pages like this:
I’ve seen this behavior occur in other reports as well (e.g. sales invoice). I suspect that reports designed with portrait orientation whose columns completely fill the width of the page are more likely to exhibit this behavior. The actual report designs do not seem to be faulty. For example, the chart of accounts report appears to be properly designed such that its elements do not exceed the page width as defined in the report’s properties in Visual Studio.
Also, the problem described here seems to produce two slightly different variations of the “page spill over” symptom.
Variation #1 (line details)
If the spill-over is caused by line detail within the report body, you will see the right-most column of the line detail spill over to the next page. This behavior is similar to what you’d see in an Excel spreadsheet that contains too many columns to fit on one page (the right-most columns would spill over to the next page).
Variation #2 (footer)
If the spill-over is caused by a report footer, you will see an extra page at the very end of the report. This extra page only will have the header, but nothing else.
Attempting to print an affected report in landscape orientation at run-time will not solve the problem. Currently, the only work-around for this issue is to modify the affected SSRS report layout within Visual Studio and then deploy the changes to the appropriate environment. Either of the following methods will work:
- Shrink the existing report elements (e.g. columns or footer section) until they all fit onto the page as intended.
- Change the report orientation from portrait to landscape.
This issue has been reported to Microsoft support by multiple users. Microsoft was able to reproduce and confirm the issue and has submitted it to development for resolution. Hopefully, a solution will be provided in a future hot fix, rollup, or service pack release.
I’ll update this article if I receive a status update from Microsoft on this issue. Also, readers are encouraged to post a comment if they have additional information that they’d like to share.
Microsoft support provided a response from the development team. This issue occurs because of a design limitation in the SSRS engine. Unfortunately, it appears that the design limitation will not be remedied in the near future. Therefore, the methods listed above are the only available solution at this time.