Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Extra Blank Page at the end in ReportViewer Control not in PDF

I have a report created in SSRS 2008 that I call from and display in an asp page using the ReportViewer Control. In the ReportViewer my report has an extra/blank page at the end, but when I export it to PDF my report is perfect!. Nothing gets off the page, margins and size are all fine, under 10.0 in for a landscape report. Any idea what could be causing this?

like image 790
Monica Avatar asked Mar 16 '11 19:03

Monica


2 Answers

I've been having a similar problem (though there was also a blank page in the exported .pdf for me), which I eventually solved by doing the following:

  • Opened up the .rdl file in my text editor of choice
  • Searched for <Width> / <xxxWidth> tags, and reduced all the values contained between these tags to be less than the value minus the width of the margins on each side.

For me, the problem width belonged to the top level <Report> element, and changing it didn't affect the appearance of the report.

Of course, the next thing to try would be doing the same with <Height> tags.

like image 125
Jimi Avatar answered Sep 18 '22 11:09

Jimi


There is a confusion there on the page design. Developers would think the report being designed is WYSIWYG, but actually it's NOT!! Microsoft reportviewer will take your designed page as the content!! and append the margins defined on the outside of your page, and turn out that your page can never fit in to one page!!

So, when you design a new report, focus on the content area, the client area, including your headers and footers, and allow margins to be appended on your outer border.

like image 31
Lin Song Yang Avatar answered Sep 21 '22 11:09

Lin Song Yang