C# 报告不会在 PDF/打印模式下在新页面上重复字段
我的报告有嵌套列表,在最里面的列表中有一个表格:
page header
page body
list1
list2
table
page footer
在每个新页面上,无论是在打印/PDF 还是正常浏览模式下,我都会看到页眉和表格标题。到目前为止,一切都很好。
我希望在每个页面上看到的是 list 1
和 list 2
的内容。
我将 list 1
项目的 RepeatWith
属性设置为 list 2
,将 list 2
项目的 RepeatWith
属性设置为 <代码>表。这在浏览模式下工作得很好,每个页面都以页眉开头,然后是 list 1
,然后是 list 2
,最后是 table
标头后跟该页面的table
数据。然而,在打印模式下,我只能看到页眉和表格标题。
我错过了一些明显的东西吗?我在 ASP.NET 项目中顺便使用 VS2008 和 ReportViewer
9.0。
My report has nested lists and in the innermost list I have a table:
page header
page body
list1
list2
table
page footer
On every new page, both in printing/PDF and normal browsing mode I see the page header and the table header. So far so good.
What I would like to see on every page is the contents of list 1
and list 2
.
I set the RepeatWith
property for the list 1
items to list 2
, and for the list 2
items to table
. This works fine in browsing mode, every page starts with the page header, followed by list 1
, followed by list 2
, followed by the table
header followed by the table
data for that page. In print mode I can only see the page header and the table
header however.
Am I missing something obvious? I'm using VS2008 by the way with ReportViewer
9.0 in an ASP.NET project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在这里遇到了同样的问题。不幸的是,来自 Microsoft Connect:
建议的解决方法是将所有内容放入表标题中并将其设置为在每个页面上重复。这在某些情况下可能有效,其中表格已经跨越页面的整个宽度,或者至少与标题信息一样宽。
但是,我使用列组,因此标题比矩阵的其余部分宽得多,所以这对我来说不是一个选择,而且它可能在这里也不起作用......
I'm running into the same problem here. Unfortunately, from Microsoft Connect:
The suggested workaround is to put everything into the table header and set it to repeat on every page. This may work in some cases where the table already spans the entire width of the page, or at least is as wide as the header information.
However, I am using column groups so the header is much wider than the rest of the matrix, so this isn't an option for me and it probably wouldn't work here either...
您好 - 我可能遇到了类似的问题,打印时报告标题没有出现在报告的每一页上,本文提供了解决方案。对于您的情况可能没有太大帮助,因为您正在处理子列表,但也许其中提到的一些属性将提供更多的调查途径:
当 RepeatColumnHeaders 不起作用时该怎么办
好运
祝YS
HI- I was having a possibly similar problem, with report headers not appearing on each page of a report when printing, and this article provided the solution. May not be too helpful in your case, as you are dealing with sub-lists, but maybe some of the properties mentioned there will provide more avenues for investigation:
What to do when RepeatColumnHeaders doesnt work
Good luck
YS