<img alt="" src="https://secure.intelligent-consortium.com/791393.png" style="display:none;">

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports

One of the most common issues a Microsoft Dynamics NAV developer runs into with reports involves a blank second page or a second page that has very little data on it. This is usually a result of the horizontal size of the report being too large to fit on standard size paper. This means that if the width of the fields and the margins added together exceeds the “printable area” of the report, it will automatically trigger a second page. For U.S.A sizing, this means the total of the horizontal size of the report is larger than 8.5 inches for “portrait” or 11 inches for “horizontal.”

A related but slightly less common issue involves the height (vertical) size of a report. Just as a report shouldn’t be too wide, it also shouldn’t be too tall. So, how tall is too tall? The exact opposite of the horizontal example above: e.g. 11 inches for “portrait” and 8.5 inches for “landscape.” That brings us to the question: what happens if the report is too tall? No big deal, right? Won’t it just trigger the printer to grab a second sheet of paper and keep on printing? Or perhaps cut off the parts that don’t fit? The answer is, unless the printer has the ability to rescale the page to fit on one sheet of paper, it’s probably going to cause a problem.

Depending on the printer, it might simply error and refuse to print, or the printer might demand “A4” paper. What is A4 paper? Isn’t that just the equivalent of “Letter” size paper, but for the rest of the world?

Not quite.

Let’s take a look. The following images represent some common size papers. In the USA we use “Letter” most of the time, and occasionally its larger cousin, the “Legal” size. But what about A4? What size is A4?

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports 1

It turns out that A4 falls somewhere in between the two sizes. Note that the width is 8.3 inches. This doesn’t pose a problem because this is smaller than the “Letter” size 8.5 inches. However, notice the height is 11.7 inches. This is where it can get tricky.

If a report’s total height is more than 11 inches, the printer may believe it needs A4 paper. The trouble is, while it’s fairly straightforward to fix the width of a report, the height is a little less obvious. Take this example modified standard report from NAV 2013.

Go to Report > View rulers. This displays both a horizontal and vertical ruler. Notice that the horizontal ruler starts at 1 and counts up, sequentially. However, the vertical ruler starts the count back at 1 every time you encounter a new section. This makes it very hard to “eye” the size of a report as you are developing it.

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports 2

To be certain that the total height of the report is not more than 11 inches, you need to look at the properties of the report. As we can see, the report below is more than 11 inches in height.

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports 3

As a developer, you will now need to check to see if you can reduce the size of the report without moving any of the fields in the footer of the report. As you can see, the report below has fields completely filling the footer with no whitespace below it. This report will need to be re-sized carefully so that none of the fields are lost. Some suggestions for doing this might include reducing the cell padding for the rows, shrinking the height of the rows, and shrinking whitespace where possible (where the green arrows are in this image). This will allow you to decrease the overall height of the report to 11 inches.

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports 4

What if the report’s width and height ARE within acceptable ranges and the printer is still asking for “A4” paper?

Check the report properties. Right-click on the gray area in Visual Studio and select Report Properties.

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports 5

Check the following settings. Notice this report is set to A4. For reports in the USA, page units should always be set to “Inches” and Paper Size should be set to “Letter.”

Report Margin Issues in Microsoft Dynamics NAV RDLC Reports 6

Once you have made the above changes, the report should print normally.
*Note: while this blog post was directed at U.S.A. NAV deployments, the same idea can be applied to NAV deployments using the metric system. If the measurements are outside of your standard paper size it could easily trigger an error on a printer that is designed to work with both U.S.A. and metric paper.

 

Microsoft Dynamics NAV Partner Innovia Consulting

Innovia Consulting

Innovia Consulting

Innovia is a multiple-award-winning Microsoft Dynamics NAV and Business Central consulting firm known for delivering innovative Microsoft ERP systems while providing exceptional client-focused service. With five project teams and a dedicated support team, Innovia has the resources to handle all types of ERP projects.

Related Posts