SSRS – Hide Rows in a Group based on a Value
If you want to hide rows in a group based on a value in Reporting Services, it is pretty easy to accomplish. You can do this using an expression, but you will need to add in another expression to get the toggle icon to display correctly.
- Click on the Tablix.
- Right-Click on the Row Group and select Visibility…
- Select Show or hide based on an expression.
- Select Display can be toggled by this report item: [Select Column Name]
- Click the fx button.
- Use an expression such as:
1
=IIF(Fields!YourField.Value like
"*YourValue*"
,true,false)
- Click Ok (twice)
If you run the report now, you will notice that the rows in the group you specified will be hidden, but the toggle +- icons will be incorrect.
To fix this:
- Click on the textbox that contains the drill down.
- Select the InitialToggleState | Expression.
- Use an expression such as:
1
=IIF(Fields!YourField.Value like
"*YourValue*"
,false,true)
*Notice the false/true is opposite of the first expression.
That should be all there is to hide rows in a group based on a value. If you have any questions or comments, feel free to comment below.