RDLC页面宽度和例如线长度
我有一份 RDLC 报告。
- 页面的宽度为
21cm
,两侧边距为1cm
(这使得我们19cm
内容)。 - 报告的正文宽度为
18.96cm
- 报告内有一个line元素,其中包含
Location = (0cm; 0cm)
和EndPoint = (18.95cm, 0cm)
因此长度为18.95cm
。这就像报告内的水平分隔线。
所以,正如你所看到的,身体应该足以容纳这条线(19厘米> 18.96厘米> 18.95厘米)。但是,当我在 ReportViewer/PrintLayout 控件中显示报表时,该行实际上会生成一个附加页面(因为它由于某种原因变得更宽)。 这会显示在实际打印的文档上(如果您将其打印出来)。
以防万一 - ReportViewer 中的简单视图和导出的报告看起来都很好,没有其他页面。
请告诉我 - 这是如何发生的以及是否有任何解决方法可以在 ReportViewer 控件内获得良好的 PrintLayout 视图?我不关心 PrintLayout 视图本身,但我关心打印文档,它使用相同的 PrintLayout。
I have a RDLC report.
- The page is
21cm
wide with1cm
margins on both sides (which leaves us19cm
for contents). - The body of the report is
18.96cm
wide - There is a line element inside the report with
Location = (0cm; 0cm)
andEndPoint = (18.95cm, 0cm)
thus the length is18.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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的情况很奇怪。尝试给出 5 毫米 (0.5 厘米) 的公差,让我们看看会发生什么。
换句话说,设置以下
18.5cm
Location = (0.25cm; 0cm)
和End Point = (18.0cm; 0cm)
>如果这不起作用,可能意味着您的页面比您想要打印的纸张尺寸高。
A4 的尺寸为
21 厘米 x 29.7 厘米
,因此请确保您的身体高度小于29.7 厘米
。如果您有顶部和底部边距,则还必须减去它们的值,因此最大高度将如下所示: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)
andEnd 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 than29.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: