在新页面的页脚字段中显示溢出
我的报告页脚中有一个文本框,它占用的列最多可以存储 5000 个字符,但页脚中的文本框由于其大小而不能容纳 5000 个字符。在我的测试中,文本框显示了 1000(“M”字母)和 1800(点)之间的字符数。
如果此字段溢出,我希望创建一个新页面,并且我希望溢出部分显示在后续页面的页脚中,从而为该列提供适当的空间,分为两个或更多页面。
总结:我希望在多个页面的页脚中显示该字段的全部内容,而不是每隔一页在页脚文本框中显示超大字段的开头。
注意:< /strong> 定义要在第一页中显示的字符数,然后在其他页面中显示其余字符不是一种选择,因为当涉及到使用固定数字的字符和长度时,我们无法达到精确度,因为每个字符都有一个不同的长度。
注2:是否需要更多信息?如果你问的话我会详细描述它!发表评论
I have a TextBox in the footer of my report that takes a column that can store up to 5000 characters, but the TextBox in the footer can't take 5000 characters due to its size. In my tests, the TextBox has displayed a number of chars between 1000 ('M' letters) and 1800 (dots).
I'd like a new page to be created if this field overflows, and I want the overflown part to be displayed in the footer of following pages, thus giving the column the proper space, divided in two or more pages.
Summarizing: Rather than displaying the beginning of my oversized field in my footer textbox every other page, I want the whole content of the field to be diplayed in the footer of several pages.
Note: Defining a number of characters to be displayed in the first page, and displaying the rest in other pages is not an option, because we cannot come anywhere near precision when it comes to characters and length using fixed numbers because each character has a different length.
Note2: Is more information required? I'll describe it thoroughly if you ask! Leave a comment
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GDI 将为您提供帮助。您可以使用 GDI 的 MeasureString 来测量给定特定字体的字符串。请参阅此 MSDN 链接
了解页脚区域有多大,一个自定义的 WillStringFitInMyFooter 函数和报告工具中的一千个瘀伤我认为你可以解决这个问题。
GDI will get you part of the way. You can use GDI's MeasureString to measure a string given a particular font. See this MSDN link
Armed with the knowledge of how big your footer area is, a custom WillStringFitInMyFooter function and a thousand bruises from your reporting tool I think you can solve this.