Empty pages in RDLC-Report
Asked Answered
V

20

61

I have a rdlc report that conains a tablix, nothing other. The Tablix expands in horizontal direction to show days and in the vertical direction to show groups.

The tablix works as expected, as long as I set the width of the content area equal to the width of the tablix.

If I expand the content size to its fixed size (approximately PageWidth-PageBorders) and run the report, every second page is an empty page.
However the tablix only uses one page. Every odd page is absolutely empty. It seems that the tablix adds its horizontal expansion to the currently definied content width and calculates then the overflow.

The reportviewer Version is 3 (2010 Redistributable)

Does someone have a solution for this odd behaviour?

Update

If I export the report to excel, I see that there is on the right site of the tablix a column that is exactly as long as the generated items for the days. It seems realy to be a bug or a feature I don't see how to deactivate.
I also have tried to create the same construction from a table, and it resulted in the same problem, what not is astonishing, because the table is internally also a tablix.

Update 1

If I set the property "ConsumeContainerWhitespace" of the report to true, the above test version works. But if I place then other elements in the "white" area, the effect reocurrs.

Virility answered 28/1, 2011 at 17:1 Comment(1)
I know its old,but here is what was solution for me: "Body of your report being too wide for your page", Read this: blogs.msdn.microsoft.com/chrisbal/2006/08/10/…Amethyst
V
52

Setting the page-property ConsumeContainerWhitespace=true (in the properties dialog, F4) has helped. However it was anyhow tricky to build the report correct. At the begining it worked only if I added all extra content to the page-header and footer. But this was not acceptable. After a lot of trying, I succeed in making the report as desired. However I don't really understand the logic behind.

I have in mind that I already have done such reports (growing in both directions, horizontally and vertically together) without any problems and I don't know what is difference to this report here. For this report, it's definitively reproducable that the ConsumeContainerWhitespace-property makes the difference. But why this never happens to me for similar reports I have done, I don't know. Also I don't know why I had first to circle around before the layout-engine accepted my design.

Virility answered 29/1, 2011 at 12:0 Comment(3)
Hi HCL,I have same problem, but i could not find this "ConsumeContainerWhitespace" property for my reportviewer.where should i find it?(I am using vs 2010)Frump
@M_Mogharrabi: Click on the outside area of report on the gray section. Properties pane will show "Report". There you can find "ConsumeContainerWhiteSpace" property.Lenticularis
In addition to solving the PageSize >= LeftMargin + BodySize + RightMargin equation, I was using the print previewer in 2012 and it forced me to to do not just a new preview (changing tabs back and forth) but after going to the preview tab, refreshing the preview there.Clynes
H
20

The best way to solved this problem is, for example for an A4 page where Width=21 cm and Height=29.7 cm

Now Margin Left=1 cm and Right=1 cm so you are having a usable width of 19 cm.

When you have understand this basic calculation that means your problem is solved. You can set up the report page size properties by right clicking on the report property => pagesetup.

Heptode answered 13/10, 2014 at 10:34 Comment(0)
A
20

I was working with an RDLC report that was printing an extra blank page. I tried all the usual tricks, and everything I could think of, until I realized the problem was caused by an extra amount of visible whitespace in the right margin area of the report. One of the objects in the report (a "Rectangle") was a single pixel or two too wide, and this prevented resizing the visible space of the report. Once I removed all the extra width, the report started printing with the expected number of pages.

Visual Studio 2017 (15.7.5) + Microsoft Rdlc Report Designer extension (v14.2)

enter image description here

Airglow answered 27/7, 2018 at 14:20 Comment(4)
Nice experience! i've had the same problemHistrionics
save me hours of grumpy mood, thank you Sir!Milden
yeah, this will remove extra blank pagesCyclohexane
This was the true answer for me. Thank you!Fjord
L
15

I had a similar problem, I solved it this way

For instance for width, the following equation should be satisfied

PageSize >= LeftMargin +  BodySize + RightMargin 

where to find BodySize?

Press F4 -> CLick somewhere inside the report -> you will find body property(look at size property, take the width value)

Where to find report PageSize?

click somewhere outside the report -> you will find report property ( look at PageSize (take its width value), and margins (Left, right, ..), take left and right margin values)

take values from these properties, and check if they meet

PageSize >= LeftMargin +  BodySize + RightMargin 
Liesa answered 11/4, 2019 at 7:5 Comment(0)
G
12

Check the "body" size, try to make it as wide and height as your real paper size but reduce only the margins.

Genevivegenevra answered 10/4, 2012 at 6:24 Comment(2)
This worked for me. I had a report that was working fine, then after adding a section, it started spewing blank (header/footer only) pages between every printed page. While there was nothing apparently wrong with the page size or margins, I acted on a hunch, decreased the margins slightly, like by .05" on each side, and the problem went away.Inflated
Worked for me too. Thank you!!!Geosyncline
M
8

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.

Milquetoast answered 10/9, 2012 at 5:15 Comment(0)
A
8

the solution is simple ConsumeContainerWhiteSpace=True (you find this in the property window for "report") you set the paper size in the main menu/ report/report properties for example to "A4" and then you check that paper size is larger then body + header + footer + margins.

Anticyclone answered 16/2, 2017 at 11:47 Comment(0)
D
7

I was having the same issue until I played with the report body's height and width. :)

Differentiation answered 12/1, 2013 at 10:4 Comment(1)
To be specific you can find the page width by clicking on the report properties -> page setup (Ex:- if you have selected A4 Lansacape width would be 29.7cm) and now close that window and click on somewhere in the report body and press F4, then you will see report body properties. All you have to do is make sure that body width is less than page size + left and right margins. According to the above example, if your left and right margins are 1cm, you should set your body width as 27.5cmConvulse
G
7
  1. Go to Property F4
  2. Select Body
  3. Write width and height to 1cm

Visual studio will overwrite to the smallest Body possible

Done.

Grus answered 11/3, 2021 at 21:34 Comment(0)
S
6

Please select "Report" in the object selector at the top of the window. and make the ConsumeContainerWhiteSpace = true if the also same problem persist then, your rdlc report size should be less than your report body.!

Spastic answered 4/9, 2015 at 10:12 Comment(0)
A
5

I have meet this problem recently.

The root cause may be:
your report's body has some blank upside report Footer or somewhere else.
The solution is :
1, click the report body
2, go to the property window, you will see the body size property
3, check the body size, you may find a strange number like 9.6654in,1.5625in.
that means you have some blank upside the Footer, modify the height or width size till there is no blank you can see.

Alexipharmic answered 12/6, 2017 at 3:22 Comment(0)
F
4

You need to make sure your RDLC Report have :

  1. ConsumeContainerWhiteSpace = true (open by click F4)
  2. Report Body Size <= Page Size+margin Size. (open by Ctrl + Alt + D)
Frizette answered 15/11, 2017 at 10:35 Comment(0)
S
3

You need set report width property to actual print page width. In my case 6 inches helped.

Sommersommers answered 8/10, 2011 at 15:36 Comment(0)
O
3

Page Footer may cause the problem too. So if you have one, it's better to place it as near as possible to the main content. In this case you don't need to set the Body.Height property.

Oder answered 4/10, 2013 at 14:45 Comment(0)
A
2

My 4x2 inch label was printing 3 extra pages for a one page report.

To fix it, I reduced the Body.Size attribute to be same or smaller than the Report.PageSize minus the summed respective Report.Margins.

Andriaandriana answered 30/12, 2013 at 20:27 Comment(0)
L
1

Try this one,

Just make sure that all Data the needed is in the report, Then Select the Table or the Matrix and make it squeeze to the left and if needed to the Top Left Corner until your white Page Problem is Done.

But make sure that the cells are squeezed in the right manner, Be gentle (I hope you got it !!)

Ok, Bye

Luci answered 3/7, 2013 at 8:37 Comment(0)
P
1

Or you can just graphically resize your report design, to the exact bottom of the last report control or label.

Or add a footer section to create some space.

enter image description here

Pinnace answered 30/6, 2016 at 15:44 Comment(0)
T
1

I thought this important enough to put here, especially since every day more of the critical information we need to do our jobs keeps disappearing:

From response to 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.

Territoriality answered 23/6, 2020 at 21:33 Comment(0)
S
1

Make sure Body size is cm , not in(inch)

Siriasis answered 24/8, 2020 at 6:22 Comment(0)
H
0

For me when I increase the width for pagesize report from 21 to 23 cm , It was not generating extra empty page. Because of few elements total size of my report's element was greater than 21 and less than 23, that is why I changed to 23cm and works for me. In my case I have only one page and I was working with .rdl file.

Hb answered 9/12, 2021 at 11:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.