Friday, February 8, 2008

Sql Reporting Services and A4 paper size

I recently run on a problem trying to set the default paper size of my reports to A4. Although I was setting the paper dimensions to 2,1cm width and 2,97cm height, when the end user was printing the report, the default page size on the page setup dialogue was Letter.
Searching the net someone mentioned that the Sql Reporting Services of sql server 2005 do not “like” the paper dimensions in cm but rather prefer inches. Changing the dimensions to 8.3in × 11.7in fixed the problem on my computer but not on the clients’ machines.
Finally, I read somewhere in the MSDN forums that in order to default the page size to A4 one must set the report’s page width to 8.27in and the height to 11.69in. Believe it or not, this fixed my problem. Everyone is printing in A4 paper size without having to set it in the Page Setup dialogue.

PS: If you want to set the orientation to landscape, you’ll have to switch the values of width and height, obviously...

14 comments:

Anonymous said...

Very handy to know. Thanks a lot.

Anonymous said...

Thanks very much for this piece of info helped a lot (as well as setting the correct margin sizes)!

It was such a pain having to keep changing from letter --> A4!!!!

:)

Anonymous said...

That solved for me too! :)

Thank you,
CSL

Anonymous said...

I found that making the body of the report smaller than the report and using centimetres worked just fine keep in mind the margins

Anonymous said...

Hi,

Thanks for the solution. I have one problem though. I have set the paper sizes according to the specifications you gave but as Landscape. But when I export to PDF it still gives me the page in Portrait form.

Anonymous said...

TY
TY
TY

I'd never have found the way

Anonymoose said...

I can't help but notice you wrote 2.1cm and 2.97cm...
Hopefully that's a typo, and not the values you actually set as properties for the report - an A4 page being "roughly" 10 times larger, it'd be no wonder the system thought it was something smaller. ;)

I have no trouble using 25,4cm as report-body width, having 28cm as pade width and 1cm as both left and right margin.

International System is your friend.

Ayang said...

awesome,
thanks for sharing.
this make me headache for weeks....

Anonymous said...

Excellent tip, thanx!

Anonymous said...

Thank you very much for kindly sharing this info, much appreciated!

Alexander Yaremchuk said...

What will be vice-versa here if I want to print in letter but in selects A4?

Andreas Botsikas said...

@Alexander, based on wikipedia http://en.wikipedia.org/wiki/Letter_(paper_size), you should set it to 8.5 by 11 inches. Let me know if it worked for you...

Anonymous said...

Thank you very much!

Anonymous said...

Thank you! You saved me!