Search code examples
reporting-servicesssrs-2008ssrs-2012ssrs-expression

SSRS. How to hide blank/empty column via expression?


I need to hide column if all rows in column is empty (blank).

In this case col3 should be hidden, because no values in column.

col1 col2 col3
 v1   v4
 v2
 v3   

I'm using following expression on columns Hidden property:

=IIF(Fields!Test5.Value = "",TRUE,FALSE)

This expression working, but It hidding each blank(empty) field, even all column isn't empty. It should hide column only when there is no values at all.


Solution

  • You can use:

    =IIF(Max(Field, Dataset)= "",TRUE,FALSE)

    If the maximum value is empty it means that there is nothing, and make your hide expression on column.