如果页面宽度小于要打印的字段的总宽度,如何将字段从 ActiveReports 6.0 报表中的某个部分移动到新页面?
我有一个 ActiveReports 6.0 报表,我正在向其中添加要在运行时显示的字段。这些字段和要显示的数据来自 DataGridView。
问题是,当要显示的字段的总宽度高于要打印的页面(例如 A4)的宽度时,这些字段会继续出现在下一个物理页面上,并且碰巧它们会部分打印在一页上。页面并停留在新页面上。
我无法找到任何解决方案,以便如果宽度无法完全打印在当前页面上,我可以将字段移动到新页面。
示例:
有一个 DataGridView,有 8 列,每列宽度为 250 像素,总共 2000 像素,对于 96 DPI 系统来说约为 21 英寸。 A4 纸的宽度约为 8.25 英寸。
边距为
左:0.25 英寸
右:0.25 英寸
顶部:0.69 英寸
底部:0.69 英寸
最初 3 列打印在第 1 页上。第 4 列部分打印在第 1 页上,部分打印在第 2 页上。
我希望第 4 栏无法完全打印在第 1 页上,然后将其移至第 2 页,它将完全打印在第 2 页上
提前致谢
I've a ActiveReports 6.0 report to which I'm adding fields to be displayed at run-time. These fields and the data to be displayed is coming from a DataGridView.
The problem is that when total width of the fields to be displayed goes higher than the width of the page on which it is to be printed e.g. A4, then the fields continue on the next physical page and it happens that they are printed partially on one page and rest on the new page.
I'm unable to find any solution so that i can move the fields to new page if the width can not be printed on the current page completely.
Example:
There is a DataGridView with 8 columns, each having a width of 250 pixels, totalling to 2000 pixels which is approx 21 inches for 96 DPI system. An A4 paper width is approx 8.25 inches.
Margins are
Left : 0.25 Inches
Right : 0.25 Inches
Top : 0.69 Inches
Bottom : 0.69 Inches
Initial 3 columns print on page 1. Column 4 prints partially on Page 1 and partially on Page 2.
I want that as column 4 can not be printed completely on page 1 then move it to Page 2 and it will be printed completely on page 2
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
水平分页确实很棘手。我想出了下面的函数来处理您的情况:
下面是一个将上述函数与 ActiveReports 一起使用的简单示例:
Horizontal page breaking is tricky indeed. I came up with the below function to deal with it in your case:
Below is a simple example of using the above function with ActiveReports: