Freigeben über


The "Every Other Page Is Blank" Feature

Many Reporting Services users ask this question:

"I'm rendering to a physical page format (PDF, Image, Print) and for some reason a blank page gets inserted between all of the other pages in the report.  Thank you, Reporting Services, for the free pages.  It's a charming feature, but paper ain't free and I'm getting paper cuts pulling out every other blank page after it's printed.  How do I make it stop?!"

To which I reply:

This is almost always caused by the Body of your report being too wide for your page.  Make sure that the Width of the Body is less than the physical page size, less the margins.  For those of you who are into the math thing, make sure that:

Body Width <= Page Width - (Left Margin + Right Margin)

For physical page renderers, it's important to keep in mind the concept of Usable Area.  The Usable Area is the amount of space left on a page for your report to be drawn after reserving space for margins, headers and footers, and column spacing (for multi-column reports).

Horizontal usable area:

X = Page.Width - (Left Margin + Right Margin + Column Spacing)

Vertical usable area:

Y = Page.Height - (Top Margin + Bottom Margin + Header Height + Footer Height)

Any time objects on your report (including the Body itself) extend past the usable area either because they are defined like that or because they grow at runtime, the physical page renderers have no choice but to break onto a new page.

Let me know if there are more questions about this.

Comments

  • Anonymous
    August 14, 2006
    I need to render my reports in html before printing, I've tried playing with the page size, margins and interactivesize property values but I can't get the report to display correctly in html.  Typically the report will have more or less page count or will add white space that doesn't show when the report is exported to pdf.  Can you help me with this?

    Thanks,
    Jacque

  • Anonymous
    February 20, 2007
    Hello,HTML and PDF rendering is fundamentally different for many reasons.  Pagination between interactive formats such as HTML and physical-page bounded formats such as PDF is never guaranteed to be the same.  As for the whitespace issue, it could be because HTML does not support overlapping report items and PDF does.  Overlapping items in HTML will be repositioned to resolve the overlap, which may push other items around as a result.-Chris

  • Anonymous
    March 07, 2007
    I've found that if you want your report to pront properly on an A4 page , the width should not be more than 16-17 cm ( depending on margins )Regarding the HTML / PDF rendering issue , I just want to add that you should always deploy and test your reports on the server , not just look at it in the Visual Studio renderer and think it's ok !VS uses a different renderer and sometimes the HTML renderer will produce different results.

  • Anonymous
    March 08, 2007
    What are the defaults for the device information settings for PDF rendering (especially the margins)?Is there an exeception thrown if I pass a faulty devInfo string when using the render method from VB?

  • Anonymous
    April 27, 2007
    I've built a report that have many columns but have parameters that set the visibility of each. When i only have a few columns visible, the pdf report shows blank pages, As if those hidden columns are taking up spaces. Any ideas?

  • Anonymous
    May 25, 2007
    I have that problem too, and it isn't the horizonal width causing it.  It won't go away!

  • Anonymous
    March 13, 2008
    I have a problem that I'm hoping you could help me with.  I am generating reports that need to be printed on a roll feed receipt printer without viewing them first.  This I have accomplished.  The problem that I have however is this:  If the report body length is less than the pageHeight set in the DeviceInfo it cuts off the slip at the end of the report which is fine, but when the report body is longer than this it cuts the report in two or more pages.  I need the full report to print on one continuous slip that only cuts of at the end.  If I don't specify a pageHeight property in DeviceInfo it stretches the shorter reports to the full length of the page which is about 3 meters.  Is there a way to set the pageHeight to the height of the report body?

  • Anonymous
    September 03, 2008
    Awesome help provided by you. Really appreciate it

  • Anonymous
    December 29, 2008
    excellent!! I was struggling with this issue all the week and it was just the width!! nice tick, thanks chrisbal

  • Anonymous
    June 08, 2009
    PingBack from http://quickdietsite.info/story.php?id=10624

  • Anonymous
    March 15, 2010
    My report has many columns defined but only a few column are made visible depending on the report parameters. When export to pdf, the page width is always assumed the total width of all columns eventhough they are not visible. Is there a way to keep the page width to only the displayed columns to avoid the blank pages?

  • Anonymous
    July 05, 2010
    The comment has been removed

  • Anonymous
    July 27, 2010
    Hello, I wanted to know how much is the space of an A4 sheet, as are the numbers that you have to use to enter into a page!I have many subreport in a report and it is difficult to do that will not be leaf

  • Anonymous
    October 21, 2010
    After 4-5 hours of faffing about I found this site. Thank you. The most helpful part was the fact that the totals have to add up to LESS than 210mm. Or even less than 180mm. I'd originally had them adding up to exactly 210mm which is not sufficient.Best,Daniel

  • Anonymous
    January 18, 2011
    I have a report that i render to PDF formatThe problem is that it opens very smallHow can i control the size of the reoprt on the PDF page ?Thank

  • Anonymous
    February 17, 2011
    It very good.Body Width <= Page Width - (Left Margin + Right Margin)this formula rellay worked for meThanksAnil Veeraghattapu.

  • Anonymous
    June 25, 2011
    Hi,I have a trouble with a report that have various subreport.The problem becomes when the subreport that contains a matrix inside a list, after each page break, in the print layout there is a page blank although the page size and margins are correct.Thanks

  • Anonymous
    July 07, 2011
    Exactly what i needed!! Thank youuuu!!!

  • Anonymous
    June 05, 2012
    GreatBody Width <= Page Width - (Left Margin + Right Margin)this formula rellay worked for meThanksgopal

  • Anonymous
    June 06, 2012
    Have the problem with two tables, the width of one of the tables < Body Width, while another table's width > Body Width. Whatever I try, SSRS keeps inserting blank pages after the first small table to make it even with the larger one.Is there any way I can stop the blank pages after the small table appearing?

  • Anonymous
    January 09, 2013
    Thank you! This article solved my problem.

  • Anonymous
    September 04, 2013
    Thanks Yar Body width should not be greater than the page width ..This has helped me in solving the blank pages issue

  • Anonymous
    September 30, 2013
    Thanks, it was exactly my issue. Your Article solved my problem.

  • Anonymous
    October 08, 2013
    for my report i checked body width+right margin+left margin<=page width and body width+topmargin+bottom margin<=page height....above calculations are correct for my reports but even when i am trying to export to pdf it is creating extra blank pages at the end

  • Anonymous
    October 08, 2013
    when i am hiding some of the columns based on parameters at the end of the report black table is coming .....can anybody help me in this issue .note:i am using ssrs reports 2005

  • Anonymous
    November 20, 2013
    The body width is the cause of issue. If your Page Width is 14in, your much Body Width must be less 0.5in to it, so it must be 13.5in. Thank you so much for helping us solve this issue.

  • Anonymous
    December 17, 2013
    Didn't help. One table. Every other page is blank. Width is way smaller than paper width.

  • Anonymous
    January 15, 2014
    This has been a problem for the last 10 years with this particular MS toy.  Why would MS fix it when people buy their product anyways?  How can you mess up something as simple as "8.5X11 canvas"?

  • Anonymous
    January 25, 2014
    I too have this problem.  My body width is 9 inches.  I have the report set to a width of 11 inches  in landscape mode with 0.25-inch margins yet I still get a blank page every other page.  I tried putting the report in portrait mode where I expect extra pages to get created since it doesn't fit and I get 2 extra pages.  The first of these extra pages is nowhere near full.

  • Anonymous
    March 27, 2014
    I'm calling "baloney" on the "it is by design" excuse. What sort of design, truly thought-out design, dictates a logical reason for printing a blank page every other page? That isn't a design, it's a FLAW that nobody at MS seems interested or capable of fixing.

  • Anonymous
    April 29, 2014
    Hidden column when exported to PDF still creates whitespace and there by blank pages in pdf. I have been following this issue, its over 7 years and solution from Microsoft yet? Whats wrong MS?

  • Anonymous
    May 15, 2014
    The comment has been removed

  • Anonymous
    May 28, 2014
    Thanks so much for the tip! Works great!

  • Anonymous
    June 10, 2014
    Thanks solve my problem apply above formula like as belowBody Width <= Page Width - (Left Margin + Right Margin)pls follow this and solve problem blank page

  • Anonymous
    September 06, 2014
    Thank You, Playing with "Body Width" and "Page Width" made blank pages gone

  • Anonymous
    October 06, 2014
    That was actually my problem as well. Although, I kind of knew that already, after reading this, I double checked everything, and found that the width of the image in my footer was specified to be larger than the page width. Thanks.

  • Anonymous
    October 09, 2014
    For me it was a problem with the sub reports width which caused extra blank pages in the exported version. REducing the width solved the issue. Thanks.

  • Anonymous
    October 29, 2014
    I have the same problem as several others above where I dynamically hide columns for different report types and this pushes the width out past what is actually displayed.Here is what I am about to try: At the same time I am hiding the columns I will set their width as small as I can (0?).

  • Anonymous
    December 22, 2014
    Nice article, saved my day.. Thanks..

  • Anonymous
    January 12, 2015
    Thanks!! solved my problem :). It was the report size, made it smaller and voila, no extra pages.

  • Anonymous
    February 16, 2015
    This article doesn't sound right at all. Some tables will be wider than the paper. What is supposed to happen in this case is that the columns that don't fit will automatically be printed on the next page. So in this case Body Width > Page Width. This shouldn't cause every other page to be blank. That's a bug.

  • Anonymous
    February 26, 2015
    try is to set the "report property" called ConsumeContainerWhitespace to True (the default is false). That's how it got resolved for me.

  • Anonymous
    May 06, 2015
    i had the same issue. for me it was additional white space on the width of the report that was causing the issue

  • Anonymous
    July 20, 2015
    thank you for sharing the solution. setting the body width considering margins and report width, solved my issue