如何在 SSRS 2008 中实现可选分组?
我在 SSRS 2005 中有一个报告表。它看起来像这样:
Group Header Row
Group Detail Rows
Group Footer Row
基于名为 GroupBy 的报告参数显示组。如果该参数为空,则不进行分组。因此,页眉和页脚的 Visibility.Hidden 属性表达式设置为 =Parameters!GroupBy.Value is Nothing
。详细信息行的可见性设置为 =Not(Parameters!GroupBy.Value is Nothing)
。
使用 GroupBy = null
呈现报表时,报表会隐藏页眉和页脚并显示所有详细信息行。这意味着切换是隐藏的,它看起来就像一个正常的、无组的报告。
在 SSRS 2008 中,这个小技巧不再起作用。如果隐藏组标题,则详细信息行也会隐藏。
关于如何将此功能融入 SSRS 2008 有什么想法吗?
I have a report table in SSRS 2005. It looks like this:
Group Header Row
Group Detail Rows
Group Footer Row
The groups are displayed based on a report parameter called GroupBy. If this parameter is null, then there is no grouping. So, the Visibility.Hidden property expression is set to =Parameters!GroupBy.Value is Nothing
for the header and footer. The visibility of the detail row is set to =Not(Parameters!GroupBy.Value is Nothing)
.
When rendering the report with GroupBy = null
, the report hides the header and footer and displays all the detail rows. This means the toggle is hidden and it just looks like a normal, group-less report.
In SSRS 2008, this little trick no longer works. If the group header is hidden, then the details rows are also hidden.
Any ideas on how to hack this functionality into SSRS 2008?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以做的是将可见性应用于组标题的行(而不是组本身)。您可以通过选择行,右键单击边缘并选择“行可见性...”来执行此操作,您可以对组页眉和组页脚执行此操作。另外,我使用这个表达式来表示可见性:
What you can do is apply the visibility to the row of the group header (not the group itself). You can do this by selecting the row, right clicking the edge and selecting "Row Visibility..." You could do this for both the group header and group footer. Also, I used this expression for the visibility: