Search code examples
sql-servervisual-studioreporting-servicesvisual-studio-2017ssrs-tablix

How to hide a column in SSRS Matrix report in SQL Server


I've got a SSRS matrix report in VS2017. I need to hide a column based on no.of days in a month.

Eg: Need to hide 29,30 & 30th Column in case of Feb Month in pic provided below.

enter image description here

My report's Dataset consists of 38 columns, I found this article with settings as =IIF(CountRows()>12,true,false) but this still fails. My report still shows the 29,30 & 32 columns.

Any help would be much appreciated.


Solution

  • Select the column to hide, right-click --> Column Visibility --> Show or hide based on an expression --> Click f(x) to provide expression as provided below

    enter image description here

    =IIF(Count(Fields!.Value) = Cint(0), True, False)