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 tabl
Make sure Body size is cm , not in(inch)
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.
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.
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.
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
.
Check the "body" size, try to make it as wide and height as your real paper size but reduce only the margins.