Show/Hide 列 Header 在 SSRS 中切换

Show/Hide Column Header on Toggle in SSRS

我正在处理一项要求,允许我在用户单击“+”(展开一行)时显示列,并在用户单击“-”折叠行时隐藏列。

例如,当所有行都折叠时,报告看起来像:

当用户点击 A 展开报表中的一行时,报表应该如下所示

请注意,COL4 仅在行展开时显示。

我尝试设置可见性属性,但我得到的结果是

如果我尝试设置 header 文本框属性时出现类似错误。

"toggle item must be the text boxes that share the same scope as hidden item or are in a scope that contains the hidden item, and cannot be contained within the report item unless current grouping scope has a parent"

我正在使用 Matrix Table

问题是单击 Col1 切换按钮将只能隐藏 table 分组中包含的元素(不包括 col2 的 header),您会看到你上面提到的错误,"toggle item must be the text boxes that share the same scope..."。

您可以在 table 区域之外放置一个文本框,这将能够切换列的可见性,但这会扩展 all col1 one 的值分组值,不会是你要找的东西。不幸的是,您不能完全按照您的要求进行操作;最好的选择是你上面显示的那个。