Articles in this section
Category / Section

How to avoid the extra blank pages in print and print preview in .NET Core Report Viewer ?

3 mins read

The paper size that you specify for the report in the Report Properties will define the pagination for the report while printing and rendering report in the print layout. The extra blank page is created when the Body of your report is too wide for your page. If you want the report to appear on a single page, all the content within the report body must fit on the physical page and the body width should be lesser or equal to the following formula:

Body Width <= Page Width - (Left Margin + Right Margin)

For physical page renderers, the concept of Usable Area should be important to keep in mind. The area of the physical page that remains after the space is allocated for margins, column spacing, and page header and footer is called the usable page area. Margins are applied only when you render the report in the print layout and print reports. The following image indicates the margin and usable page area of a physical page.

Indicates margin and usable page area

The following formula is used to calculate the usable area of the report rendering:

Horizontal usable area:

X = Page.Width - (Left Margin + Right Margin + Column Spacing)

Vertical usable area:

Y = Page.Height - (Top Margin + Bottom Margin + Header Height + Footer Height)

 

Consider the report width is 21 cm, the left margin of the report is 0.5 cm, and the right margin of the report is 0.5 cm. To avoid an extra printed page in the exported PDF file, the following formula is used:

width of body (20) + left margin (0.5) + right margin (0.5) <= report width (21)

If the width of body is 20 or lesser, it will be rendered without extra pages. When it uses greater than 20, it will add extra pages.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied