如何对空表强制执行 SSRS 分页符?

发布于 2024-12-24 02:50:20 字数 388 浏览 1 评论 0原文

我正在编写 SSRS 2008 报告。我有一个非常简单的报告,其中包含三个表,每个表都有一个不同的数据集/tablix(显示相同的字段)。我将前两个的 PageBreak.BreakLocation 设置为 End - 我希望这三个单独显示。用户将直接将其导出到 Excel。

当所有三组都有数据时,它可以正常工作,并且在 Excel 导出中,它会将它们显示在适当命名的三个工作表中。当没有数据时,它不会强制分页。因此,如果只有我的第三个数据集有数据...前两个数据集显示在其上方,只有行标题为空,与第三个数据集位于同一工作表中,这是唯一导出的数据集。

即使这三组中的任何一组都没有数据,我也希望强制执行分页符。我可以使用 NoRowsMessage 明确指示没有数据,但我仍然需要单独的选项卡。关于如何实现这一目标有什么想法吗?

I'm working on an SSRS 2008 report. I have a very simple report with three tables, a different data set/tablix (with the same fields displayed) for each. I have PageBreak.BreakLocation set to End for the first two - I'd like the three to be displayed separately. Users will be exporting this directly to Excel.

When all three sets have data, it works fine, and in the Excel export it displays them in the appropriately named three sheets. When one doesn't have data, it does not enforce a page break. So if only my third data set has data...the previous two display above it, empty with just row headers, in the same sheet as the third data set, which is the only one that's exported.

I want the page breaks to be enforced even if there's no data for any of the three sets. I can use NoRowsMessage to explicitly indicate there's no data but I still want the separate tabs. Any ideas on how to accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

悍妇囚夫 2024-12-31 02:50:20

对我来说,接受的答案不起作用,但我们使用共享点集成来运行 SSRS 报告,这可能就是原因。

在表格下方添加一个矩形,我想要在之后分页,并将矩形属性更改为在末尾分页对我有用。

这篇文章提出了一种将桌子放在矩形内的方法,尽管我没有测试这个 -
http://www.sqlservercentral.com/Forums/Topic1315543-147-1.aspx

For me the accepted answer did not work but we use sharepoint integration to run our SSRS reports, which might be why.

Adding a rectangle underneath the tables I wanted a page break after and changing the rectangle properties to break at end worked for me.

This post suggests a method of putting the table inside the rectangle although I did not test this -
http://www.sqlservercentral.com/Forums/Topic1315543-147-1.aspx

轻拂→两袖风尘 2024-12-31 02:50:20

显然,本地工作时导出到 Excel 功能的处理方式与使用报告服务器上部署的副本之间存在差异。在本地运行时,我的 Excel 导出工作就像 John 最初描述的那样(在同一工作表上组合多个空表)。但是,当我部署该报告并从服务器运行它时,导出按预期工作。

Apparently, there is a difference between how the export to Excel feature is handled when working locally versus using a deployed copy on the reporting server. When running locally, my Excel export worked just as John originally described it (combining multiple empty tables on the same worksheet). However, when I deployed the report and ran it from the server, the export worked as expected.

不一样的天空 2024-12-31 02:50:20

而不是设置分页符->将 Location 属性打破为“End”,将所有 Tablixes(第一个 Tablix 除外)的其设置为“Start”。

Instead of setting Page Break -> Break Location property to "End", set it to "Start" for all Tablixes, except the 1st one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文