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

22,522

Solution 1

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.

Solution 2

in case of an SSRS report, right click on the column and click Textbox Properties, choose Column Visibility and write down the below expression on "Show or hide based on an expression"

You can use below if the column value is Null:

=IsNothing(Fields!Column.Value) 
Share:
22,522
Stanislovas Kalašnikovas
Author by

Stanislovas Kalašnikovas

T-SQL / SSRS / SSAS / SSIS / SQL-Server

Updated on July 05, 2022

Comments

  • Stanislovas Kalašnikovas
    Stanislovas Kalašnikovas almost 2 years

    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.