如何消除 ReportViewer 控件呈现的 RDLC 中的双分页符?
我有一份较长的报告,并且想要在新页面上开始矩阵,因此我选中了“在之前插入分页符”选项。 但是,无论何时在此位置发生自然分页符,因为该矩阵之前的内容只是填满一个页面,ReportViewer 控件都会发出此“在之前插入分页符”,从而导致一整行空页(我的报表可以是超过 1 页宽)。渲染 PDF 时会发生这种情况。
如果同一位置已经存在自然分页符,是否有办法抑制显式分页符?
I have a longer report and want to start a Matrix on a new page, so I checked the "Insert Page Break Before" option.
However, whenever a natural page break occurs at this location anyway because the content before this matrix just fills up a page, the ReportViewer control issues this "Insert Page Break Before" regardless, resulting in a whole row of empty pages (my report can be more than 1 page wide). This happens when rendering PDF.
Is there a way to suppress an explicit page break if there already is a natural page break at the same location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来,通过删除设置了“分页符之前”的矩阵与其正上方的元素之间的所有空白,我消除了该问题。我认为“双”分页符并不是真正的分页符,而是空白页面实际上包含内容 - 被推送到新页面的空白区域。
It appears that by removing all white space between the Matrix that has the "Page Break Before" set and the element directly above it I eliminated the problem. I suppose that the "Double" page break wasn't really one, but that the empty page actually contained content - the white space that was pushed to a new page.