Reputation: 3077
I have a RDLC report.
21cm
wide with 1cm
margins on both sides (which leaves us 19cm
for contents). 18.96cm
wideLocation = (0cm; 0cm)
and EndPoint = (18.95cm, 0cm)
thus the length is 18.95cm
. This is like a horizontal separator line inside the report.So, as you see the body should be enough to contain the line (19cm > 18.96cm > 18.95cm). But when I go and display the report in the ReportViewer/PrintLayout control the line actually generates an additional page (because it grows wider for some reason). And this shows up on the actual printed document (if you print it out).
Just in case - the simple view in ReportViewer and the exported report both look fine, no additional pages present.
Please tell me - how does this happen and if there are any workarounds to get a good PrintLayout view inside the ReportViewer control? I do not care about the PrintLayout view itself, but I care about printing the document out, which uses the same PrintLayout.
Upvotes: 1
Views: 4406
Reputation: 12613
Yours is a strange scenario. Try giving a tolerance of 5mm (0.5cm) instead and let's see what happens.
In other words set the following
18.5cm
Location = (0.25cm; 0cm)
and End Point = (18.0cm; 0cm)
If that doesn't work, it probably means your page is taller than the size of paper you desire to print on.
A4 is 21cm x 29.7cm
so make sure the height of your body is less than 29.7cm
. If you have top and bottom margins, you'll have to subtract their values as well so the maximum height will be given as follows:
Max Height = 29.7 - (Top Margin Height + Bottom Margin Height +
tolerance
)
tolerance
value should be approximately0.5cm
Upvotes: 1