Reporting Services - Hide Matrix Column Conditionally

matrix, reporting-services

Solution

Yes it is possible. It you click on the group and edit its properties under the Visibility tab you can the visibility using an expression. For example I have a report that has a detail group and a valuetype group and I would like to only show value groups that have data in them.

I do that by setting the visibility expression for the group to the following:

=CountDistinct(Fields!ValueType.Value,"matrix1_Detail")=1 OR Max(Abs(code.GetValue(Fields!Value)))=0

When the expression code evaluates to true the column is hidden.

Problem

In a matrix report is it possible to hide a column based on value of the parent group? For example, I've got a column called "value" which I'd like to hide when the column group that contains it has a specific value.

Original source