Monday, December 16, 2013

Ax 2009 - Getting Rid of the Scaling message


When a report doesn't fit on a page, depending on it's properties Ax will resize the report. This is a powerful and very useful feature.
Now Ax will inform you that the report has been rescaled (Report is scaled xx percent to fit to page) and this message is generally not well received by users.


Ax has a built in feature to suppress this scaling message. You can modify the init method of your report, and add something like this:

this.printJobSettings().suppressScalingMessage(true);

You can set this value to true on a specific report but if you want to do this for all the reports you can go to class SysReportRun, in the Run method, place following code before the call to super:

            if(this.printJobSettings())
                        this.printJobSettings().suppressScalingMessage(true);

Note that in some reports like Salesinvoice, SalesPackingSlip etc. the scaling message still appears after changing the value to true. In these specific reports it is required to add this code to the fetch method:
            element.printJobSettings().clientPrintJobSettings().suppressScalingMessage(true);

No comments:

Post a Comment