In reporting server you have the option to export your reports to PDF format. By default your reports are generated in the portrait format. When building your report the body will automaitically resized when you add report items which did not fit. After deploying your report, it renders correct in your browser. However after exporting the report you see that the report is exported in the portrait format. This is not nice and generated extra pages. This can be avoided to export the PDF in landscape format. To export your reports to PDF format in landscape format, you need to do the following:
Retrieve the properties of your report. (Right mouse click, just outside the body of the report).
Set the width of the report to the landscape size of your A4 paper: 29.7 cm
Set the height of the report to 21 cm.
To avoid extra blank pages during export, the size of the body should be less or equal to the size of the report - margins.
Set the width of the body to 26.7 cm (29.7 -1.5 - 1.5)
Set the height of the body to 18 cm (21 - 1.5 -1.5)
Your report is now defined in landscape which will result in generated PDF exports in the landscape format.
Enjoy building your reports.
Showing newest posts with label export PDF. Show older posts
Showing newest posts with label export PDF. Show older posts
Wednesday, January 27, 2010
Monday, December 28, 2009
Export of SSRS reports to PDF generates extra blank pages.
In Reporting Server you have the option to export your reports to PDF. This works fine however sometimes extra blank pages are generated. For instance, the reports is rendered on your screen on 3 pages. After exporting to a PDF file you got a file with 6 pages. After every printed page with content you goy an empty page. This is caused by the fact that the width size of the body of the report must be less or equal to the width size of the report minus the sum of the left and right margins.
Retrieve the body properties of a report:
Retrieve the report properties of a report:
Click on the gray area outside the report. The property window will now display the size of your report.
In this example the width size of the body is 19.7 cm. The report width is 21 cm. The left margin of the report is 0.635 cm and the right margin of the report is 0.635 cm. To avoid an extra printed pages in the exported PDF file next formula is used.
width size of the body + left margin of the report + right margin of the report <= report width
In this example: 19.7 + 0.635 + 0635 < 21
Yes that's the case because 20.97 <= 21
Enjoy exporting your SSRS reports to PDF.
Retrieve the body properties of a report:
- Enable the properties window. (In Visual Studio, View, Properties Window)
- Click on the body of the report. The property window will now display the size of your body.
Retrieve the report properties of a report:
Click on the gray area outside the report. The property window will now display the size of your report.
In this example the width size of the body is 19.7 cm. The report width is 21 cm. The left margin of the report is 0.635 cm and the right margin of the report is 0.635 cm. To avoid an extra printed pages in the exported PDF file next formula is used.
width size of the body + left margin of the report + right margin of the report <= report width
In this example: 19.7 + 0.635 + 0635 < 21
Yes that's the case because 20.97 <= 21
Enjoy exporting your SSRS reports to PDF.
Labels:
blank pages,
export PDF,
reporting server reports,
SSRS
Subscribe to:
Posts (Atom)