|« SQL CPU running at 100 percent on SCOM Reporting Server||FastCGI PHP on Windows 2008 »|
Update 17 december 2009: This procedure was written on SQL 2005. For SQL 2008 I have added some lines at the bottom of the post, so if you are on 2008 please also check there before applying and it will work for you as well.
End of update.
Everywhere I come to deploy SCOM a common question is to get lots of reports out of it. However after creating the reports and scheduling them for delivery it mostly stops. However as soon as somebody tries to print the reports the printers usually hang asking for Letter size paper.
The default behavior for the PDF rendering in SQL Reporting Services is to render it to Letter paper size. So how to get it to render to A4 paper size?
After some searching with a DBA colleague of mine we came across some MSDN pages explaining the options to create custom rendering options.
What to do:
On your reporting server go to the Rsreportserver.config file located in the reportserver directory. In my case this was at C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer . We need to edit this file, so open it with Notepad or something like that (something that does not break up the XML formatting in the file).
Scroll down to the section starting with Render.
You will see entries like this:
What we want to do here is for instance add a custom PDF extension. So here goes. Create some space below the PDF entry and paste something like the following:
This adds two entries to your report server export drop down list.
- make sure your name is unique (Extension name).
- The overridename entry is what you see in the drop down list.
- pageheight and pagewidth must be defined in Inches like in the example above.
- A4 is defined mostly as 8.3in x 11.7in , but in some cases the result is better when using 8.27in x 11.69 in.
Save the file and immediately you can use these formats. No restarting of services needed here if you are on the SQL 2005 version.
Original page on MSDN covering the topic.
Update 17 december 2009 on SQL 2008 version:
In the lines of code please use "PDFRenderer" in stead of "PDFReport". Also you must restart IIS on the box before it will show in reporting services. This is the difference with the 2005 version.
Thanks to Peter Yang from Microsoft for pointing out these changes.
As it seems to be case sensitive I just placed the SQL 2008 Reporting Services code block below for you to cut and paste.
This post has 1 feedback awaiting moderation...