hiding rows that contain no values
Solution 1
I know this solution may not be the best, but it works:
=iif(fields!Jan.Value
+fields!Feb.Value
+fields!Mar.Value
+fields!April.Value
+fields!May.Value
+fields!June.Value
+fields!July.Value
+Fields!Aug.Value
+Fields!Sept.Value
+Fields!Oct.Value
+Fields!Nov.Value
+Fields!Dec.Value=0,TRUE,FALSE)
I realized since the fields are all int
, i can just add them together and check whether they add up to 0.
Solution 2
You need to use AND (if all of the values need to be 0 to hide the row), and try using LEN()
=iif(len(Fields!Jan.Value) = 0 AND len(Fields!Feb.Value) = 0 AND len(Fields!Mar.Value) = 0,True,False)
I would also use the Visibility property accessed by highlighting the row, and using the Properties window rather than through the Right-Click menu.
Alex Gordon
Check out my YouTube channel with videos on Azure development.
Updated on May 04, 2020Comments
-
Alex Gordon about 4 years
I would like to hide rows in my report that contain no values in a certain set of fields.
This question is helpful
How to filter rows with null values in any of its columns in SSRS
i do not understand how to check whether multiple fields are null.
currently, i am doing this:
and under the visibility:
and i typed this expression:
=iif(fields!Jan.Value +fields!Feb.Value +fields!Mar.Value +fields!April.Value +fields!May.Value +fields!June.Value +fields!July.Value +Fields!Aug.Value +Fields!Sept.Value +Fields!Oct.Value +Fields!Nov.Value +Fields!Dec.Value="",TRUE,FALSE)
but i am getting this error:
how do i hide a row if the values are null or blank?