Empty pages in RDLC-Report

女生的网名这么多〃 提交于 2019-12-02 20:04:14

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.

user3778502

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.

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

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.

Florin Siri

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.

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

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.!

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.

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)

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)

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

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.

midohioboarder

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.

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

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.

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 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!