none
ReportViewer .net reports - hide a parent group, but still show child groups RRS feed

  • Question

  • I would like to be able to hide a specific parent group but still show all the child groups under it, under certain conditions. For example, I have the following scenario

    Grandparent Group

    Parent Group

    Child Group

    When I set hide Grandparent group when parameter id > 0, the data for the Grandparent is not displayed and I'm unable to expand the parent groups and child groups. Do you have any idea of how this can be achieved.

    If there is only one grandparent group then I don't want to display this, as it is obvious which one it it.

     

    Regards

    Robert

    Wednesday, April 20, 2011 2:03 PM

Answers

  • Hiding the parent group hides all its children. What you can do is create two tables that different only in whether it has the Grandparent group, and toggle the visibility of the tables based on your id parameter. Like so:

    Table1 - Grandparent and Parent groups, hidden IFF id>0

    Table2 - Parent group only, visible IFF id>0


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by Robbiexxxx Thursday, April 21, 2011 2:41 PM
    Wednesday, April 20, 2011 3:42 PM
    Moderator

All replies

  • Hiding the parent group hides all its children. What you can do is create two tables that different only in whether it has the Grandparent group, and toggle the visibility of the tables based on your id parameter. Like so:

    Table1 - Grandparent and Parent groups, hidden IFF id>0

    Table2 - Parent group only, visible IFF id>0


    Cephas Lin This posting is provided "AS IS" with no warranties.
    • Marked as answer by Robbiexxxx Thursday, April 21, 2011 2:41 PM
    Wednesday, April 20, 2011 3:42 PM
    Moderator
  • This seems a bit rubbish. I have to copy the table four times becuase I don't wan't it to show the parent group, if the user has selected this group as a parameter and thus there is no grouping (e.g. if the user selects a specific town, then we don't have to have town as a parent group, as there would only be one. Surely there must be a way to hide the group other than copy the whole tablix.
    Sunday, July 17, 2011 5:12 PM