在 SSRS 报告中插入分页符
我在 SSRS 中有一份报告,其中包含 12 个子报告。在每个子报表之后,我需要插入一个分页符,以便每个子报表在新页面上开始,并且不与其他子报表共享页面。有谁知道该怎么做?谢谢
I have a report in SSRS that contains 12 subreports. After each subreport, I need to insert a page break so that each subreport starts on a new page and doesn't share pages with the other subreports. Does anyone know how to do this? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我找到了答案。在每个子报表底部的所有 Tablix 和其他渲染对象之后使用一个矩形。然后将其“PageBreak”属性设置为“End”。当子报表完成 Tablix 和/或其他数据对象时,矩形会强制分页。另外,一个很酷的功能是,如果子报表不返回任何数据行,则不会呈现分页符。因此,没有额外的分页符
I found an answer. Use a Rectangle at the bottom of each SubReport after all Tablixes and other rendering Objects. Then set its "PageBreak" property to "End". When the SubReport is finished with the Tablix and/or other data objects, the Rectangle forces a page break. Also, a cool feature, if the SubReport returns no rows of data, the page break is not rendered. Therefore, no extra page breaks
另一种解决方案是将子报表放置在矩形内。我想这将帮助您更好地控制和组织报告的布局。
Another solution would be to have the subreports placed inside the rectangles. I would imagine this would help you to better control and organize the layout of the report.
我在这里尝试了其他答案,但我的主报告是由数据集驱动的,所以不太成功。这就是我让它为我工作的方法:
1)我将子报表放入 Tablix 内相同大小矩形顶部的不同行中,所有行都属于同一行组。
2)然后,我选择了该组的属性,然后分页并检查了组的每个实例之间的属性分页符。
I tried the other answer here but my master report is driven by a dataset so didn't quite work out. This is how I got it to work for me:
1) I put the subreports into different rows on top of same size rectangles inside a Tablix with all the rows belonging to the same row group.
2) I then selected properties of the group, then pagebreak and checked the property pagebreak on between each instance of group.
只需使用 Tablix 属性的“常规”选项卡上的“在之后添加分页符”即可。
Just use the "Add page break after" on the General tab of Tablix Properties.
我遇到了同样的问题,但我能够通过下面提到的方式克服。
我创建了一个子报告,并将矩形放置在子报告内(之前检查了分页符选项),并将所有子报告内容放置在矩形内。仅当子报表呈现任何数据时,此分页符才起作用,否则将不会出现分页符。
I came across the same kind of issue but I was able to overcome by below mentioned way.
I created a sub report and placed rectangle inside the sub report (page break option checked before) and placed all my sub report content inside the rectangle. This page break works only if the sub report renders any data if not they will be no page break.
我已经制作了许多带有首页摘要和第二页详细信息的报告。
使用 Tablix 进行分页符
塔布利克斯>属性>分页>中断位置>开始/结束/……
I have made Many reports with a front Page Summary and Page 2 with the Detail.
Use the Tablix for the Page Break
Tablix > Properties > PageBreak > BreakLocation > Start / End / ......
就像其他答案提到的那样,我在矩形/表格上使用了“分页之前”选项,但由于某种原因,如果它不在(子)报告的最顶部,它只会破坏页面
Like other answers mention, I used the "Page break before" option on rectangles/tables, but for some reason it would only break the page if it wasn't at the very top of the (sub)report