访问:每组页码
我试图在每个组的页脚中获取“第 n 页,共 n 页”。 我可以获得每组的页码,但总页数不依赖于每组的记录数,因为根据一条记录的详细信息,可能会跨越多个页面。
这可能吗?
I am trying to get "Page n of n Pages" in the page footer for each group.
I can get the page number per group, but the total pages is not dependent on the number of records per group, because depending on the detail of one record, could span multiple pages.
Is this even possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
找到此页面,但您需要将原始[页面]声明保留在不可见的位置否则它无法正常工作。
="页面" & [页面]& “的”& [页数]
Found this page, but you need to leave somewhere invisible the original [Page] declaration or else it doesn't work right.
="Page " & [Page] & " of " & [Pages]
我不确定这是否可能。您可能可以使用组的 OnFormat 事件中的代码来计算组中的页数,但在到达组的末尾之前,它不会准确。
我真的不认为这个问题有解决办法。
就其价值而言,这不是我曾经需要做的事情。一种解决方法是使用常规的“Page [Page] of [Pages]”表达式多次打印报告,每个组打印一次。如果你只有十几个小组,这不会是一个可怕的混乱。另一方面,如果您有数百个组,那就没有那么多了!
I'm not sure if this is possible. It may be that you can use code in the OnFormat event of your group to calculate the number of pages in the group, but it's not going to be accurate until you've reached the end of the group.
I really don't think there's a solution to this.
For what it's worth, it's not something I've ever needed to do. One workaround would be to print the report multiple times, once for each of your groups, using the regular "Page [Page] of [Pages]" expression. If you've got only a dozen or so groups, this wouldn't be an awful kludge. On the other hand, if you've got hundreds of groups, not so much!