posted on Tuesday, December 06, 2005 2:06 PM by dfaceved

Reporting Services Therapy: Visibility of group Header

How to conditionally hide group header based on number of detail rows:

  1. Select the entire row that contains the Group Header.
  2. In the Visibility-Hidden Property enter the expression:

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

What is happening here:
In this case, I want to display the group header only if the group has detail rows. A group header can display aggregate information about itself. Since I can enter an expression for the visibility of a row, I can change it's visibility based on the Count of Items in the group. I chose to count on the ItemNumber field, but you can use your own field.

Note: If the detail row is itself grouped, this count will not work.

Comments