10

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?

2
  • It could be your web browser formatting the report incorrectly. I've seen some SSRS reports show up with different formatting between browsers.
    – Colin
    Commented Mar 16, 2011 at 19:53
  • The same issue shows up using IE7, IE8, and Firefox 3.5.
    – Monica
    Commented Mar 16, 2011 at 20:03

9 Answers 9

19

Short Answer: Try shrinking the vertical size of the Body so there is no whitespace below the last page item.

Long Answer: I had the opposite problem when using reportviewer to render a 1-page form letter. Reportviewer rendered it correctly (one page) in the browser, but the exported PDF added a blank page 2. The Body size in my .rdlc file was exactly 8.5 x 11 in. so I could see the margins. Shrinking the vertical size of the Body to remove the whitespace below the last item (9.8" in my case) fixed the problem. (The exported PDF still has a page size of 8.5x11.)

(Thanks jimconstable. I don't yet have the "reputation" to vote for answers.)

1
  • 4
    A comment on the Short Answer: It can also be caused by a too wide horizontal size.
    – Godspark
    Commented Jul 29, 2015 at 10:12
7

Is the report surface larger than the page? That will cause an extra page that might not be there in a pdf.

1
  • 1
    and be sure to inspect the width too Commented Jul 25, 2017 at 21:48
7

This is usually caused because some of your page items... text boxes, rectangles, lines, tables... fall outside of the margins. I usually work on rather complex reports and what I have to do is put boarders (with different colors) on each thing that has an edge near the right hand of the page.... then when you preview, you can tell by the colors which thing is overflowing. Then you can re-size the objects or the margins until nothing overflows and the extra page is gone.

This actually happens a lot with sub-reports. They can push over textboxes, rectangles, lines... anything... that are placed to the right of them.

This can be an incredibly frustrating problem but I highly suggest adding colored borders to your report objects until you find what is spilling over. Sometimes - it can even be the canGrow property or it can be just white space left below your lowest report object so be sure to drag the bottom of the report body almost all the way up to the lowest object on your report (sometimes if the report body touches the lowest item that item's content can be cut off though, I always leave a little space, about the height of one of these letter's I am typing)

2
  • Also... when things overlap this blank page issue. Make sure when you go into preview mode that there are no errors about anything overlapping. Commented Mar 20, 2011 at 16:09
  • +1 for suggesting turning on all of your borders to see the offending element.
    – Taterhead
    Commented Jan 24, 2013 at 10:46
5

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.

2

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.

2

I had the same problem with a very simple report. My solution was in the Report Properties\Margins, set all the margins (left, top, right, bottom) to zero. That shrinks the report width and height. Apparently the margins are outside of the page size, usually (8.5 x 11 in).

I hope this solve the problem.

2

I also got the blank page at the end of report, but it disappeared in PDF. And I found that, if we uncheck the option "Add page break after", the blank page will not appear in SSRS. But When we export to PDF, there are no page break in PDF.

1

I've found that removing the Column Group for a detail report solved the problem. Nothing else worked. I made sure the Body fit within the Page size, made sure there was nothing extending into a margin in the Header or Footer. I didn't need column grouping and the output was the same without it. It seems to be necessary when using the Report Designer but isn't necessarily needed for the resulting report.

0

You have to check that the width of the bofy in the "Body properties" tab is not higher that the width of the page in the "Report properties" tab, otherwise the last part of the body renders in another page. A4 size is 21cm x 29,7cm and make sure to consider the margins to calculate the max body size.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.