I have a a Tablix in SSRS 2008 and I have a Column that sometimes has data and sometimes doesn't. I want to hide the column if NO rows have data.
So this would hide Column 2:
Column 1 Column 2 Column 3 Column 4
1 3 4
2 3 4
This would NOT hide Column 2:
Column 1 Column 2 Column 3 Column 4
1 3 4
2 2 3 4
Is there a way to do this in SSRS 2008?
Thanks!
Very old post, but I figured out a better solution for this when using an SSAS cube. Since all of the aggregation has already occurred within SSAS, you can simply check if the parent level of the hierarchy has a value.
This is done accordingly:
=IsNothing(Fields!Field.Value)
No summation or if statements necessary with SSRS. Because the function evaluates to true
or false
, and because the expression is evaluating whether or not to hide the column (i.e. True hides it) that is all you need in the formula.