reporting-servicesssrs-tablix

How do I hide the toggle (+) icon when there are no items in the child group?


I have a report that has 2 groups. "A" is the parent group with child group "B." In the screen shot below the dark grey lines are group "A" and the light grey lines are group "B." If you expand next to 1 then the child groups appear. However, groups 228 and 229 do not have any data below them, but the toggle icon still appears. I'd like to hide the toggle item if there is nothing below it to show. All the solutions I've found hide Group A based on the count of B, but I want group "A" (dark grey lines) to always be visible. Is there a way to do this?

enter image description here


Solution

  • In any grouping you want the functionality you have to do the following:

    enter image description here

    Add two lines for the group with the same label.

    The first line will have the expand/collapse icon and you will make it hidden when there are no child rows with an expression like:

    =RunningValue(Iif(Fields!g2.Value="",0,1), Sum,"g1")=0
    

    In a similar way you will make hidden the second line of group1 when there are child rows for group2

    Your final report will look like the one below

    enter image description here