Thursday, February 18, 2016

SSRS adding extra page or white space when exporting to PDF

My employer has software that runs Crystal Reports (ver 9) out to PDF files every night to a shared network drive.  I've been tasked with converting all of those reports over to SSRS and by using the subscriptions to generate these reports. When I started with my first report and did an export out to a PDF file, it kept adding extra blank pages at the end.

Here are the specs of my environment...
1. SSRS 2008 (installed directly on the db server)
2. Report Builder 3.0
3. Windows 7 workstation

From previous experience I knew that I couldn't expand the body of the report out past a certain point but I couldn't remember what that was.  I expanded the width out to 8.5 and I didn't touch the margins.  After playing around with the margins and the body width, I found out that I had to take the body width and subtract that by both the left and right margins and if it was greater than 8.5, it was going to push white space onto a page that should show up to the side of it but it looked like the next page.

So, in short, to keep extra white space from showing up at the bottom of an SSRS report, take the body width subtract left margin subtract right margin which should be less than or equal to whatever you would be printing to...in my case to a PDF.

No comments:

Post a Comment