Wednesday, January 27, 2010

SSRS export to PDF in landscape format.


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.

26 comments:

steeve said...

I tried your solution and it doesn't change anything.

André van de Graaf said...

Steeve, can I help you. Do you have a skydrive from which i can download the report to look what is wrong?

ALM said...

The page size needs changing to 29.7 x 21 cm in the report properties also not just the body size

eva said...

I am using Report builder 3.0 to create the report. I don't see any property option there.

André van de Graaf said...

Eva,

You can enable the propertie window in report builder 3.0. by default it is not enabled. Select in teh menu View, Now you can select (tick) Properties. After enableing this you will get the propertie window.
Another way of doing this. Put your mouse on the blue part just outside your report and do right mouse click and select report properties. Or in the report, right mouse click and select Body properties.

Success in configuring your reports in landscape

Slideshow Bob said...

Thanks. Very simple and works fine.

Veerapandiyan.K said...

Hai Andre van - How to export pdf file portrait format A4 size from SSRS report - Please Help

-Veerapandiyan

Gina Cronican said...

This works for the report when you have VS2010 loaded. Any ideas when justRedistributable Report Viewer is installed and not VS2010?

oliyaithedi said...
This comment has been removed by the author.
oliyaithedi said...

thanks it's working fine

Paul Kern, PMP said...

So, so very helpful! ... SSRS is a great tool, eliminating ad hoc queries by support, and developers spending time on reports. But this 3.0 tool leaves a bit to be desired for ease of use!

Koen Verbeeck said...

When calculating the size of the body, don't forget to take the header and footer height into account as well!

Stu Schmied said...

I found another 'fix' which required changing the config file that was extremely difficult. I am glad I found this one (altho I did feel stupid once I saw it)!!

Thanks for posting it!

Stu Schmied said...

I found another 'fix' which required changing the config file that was extremely difficult. I am glad I found this one (altho I did feel stupid once I saw it)!!

Thanks for posting it!

Unknown said...

Can some one help me to fix these issues in SSRS report.How and where?

• Make it legal size
• Set margins to “narrow” setting
• Centering all the columns except the dollar amount column
• Reduce the font size to 8 for the body and 14 for the heading

rani irsan said...

Thank you so much. It works fine.

Ayah Nsour said...
This comment has been removed by the author.
Unknown said...

Thank you very much!
works a charm...

Cheers,
Arun

Fahad Mchumi said...

Thanks man, really helpful.Your article has en-lighted crucial and important ways to work with report builder. Many thanks, GOD bless you.

Roja Rani said...

Hi,
I'm facing an issue when my ssrs report is exported to pdf from sharepoint. The text box data is aligned to Right. Because of that the last letter is getting truncated. Could any please suggest to fix the issue.

Thanks

Brad Pears said...

I am having issues exporting my report to .pdf. It is inserting a blank page in between pages. Looks fine in the SSRS report on screen. I tried the suggestions above re: making sure that the body is equal to or less than the width of the page and I am still getting the issue.

I am using Report Builder 3.0. My application is running on Chrome. My report is in landscape mode. Paper size is legal. Report width is 27.94 cm. I modified and made sure my body was less than that - at 27.85 in width. Should be good, no?

What am I missing?? Report is 3 pages long but yet I am getting 6...

Help!!

Brad Pears said...

and ps... My left and right margins are set at 0.

kirthik said...

It helped me indeed. Thanks a lot :)

Tanyaradzwa Chamarime said...

Helped a lot, many thanks

Deepanshu said...

This helped, thanks.

Manivannan Shan said...

My report has more columns that landscape can take. so the report is broken into two parts. how to setup that the report Fits to the chosen size by shrinking size. Print "Fit to Page".

Is there any scaling the size option?