none
Determine if there is more than one member in a group RRS feed

  • Question

  • I've got a report with two groups, the first group "department" is used to seperate the details rows based on the only the one field and the group does have a summary row as there may be several departments included in the report. 

    The second group "Region" only has a footer which simply totals all the values for related "department" details.

    Here lies the problem, I don't want to see the "Region" totals if there was only one deparment in the "department" group because esentially this would be an exact duplicate the "department" summary row and isn't needed.

    Any suggestions for the expression that would be needed in the "Region" rows Visability property to control whether the row is displayed or not.

    Thank you,

    Dan


    profile for Daniel_DeHaven at Stack Overflow, Q&A for professional and enthusiast programmers
    Thursday, November 11, 2010 3:25 AM

Answers

  • Hi Dan,

     

    In order to hide the total in the “Region” Group Footer if only one department is included in this region, we can specify the Hidden property of the cell to the expression like:

    =IIf(CountDistinct(Fields!Department.Value)>1,False,True)

    Please correct the department field name in the expression based on your report, and in the expression, the CountDistince function will returns a count of all distinct departments in the region.

     

    Thanks,

    Tony Chain


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, November 15, 2010 5:49 AM
    Moderator

All replies

  • I use RunningValue()

    Thursday, November 11, 2010 8:57 PM
  • Hi Dan,

     

    In order to hide the total in the “Region” Group Footer if only one department is included in this region, we can specify the Hidden property of the cell to the expression like:

    =IIf(CountDistinct(Fields!Department.Value)>1,False,True)

    Please correct the department field name in the expression based on your report, and in the expression, the CountDistince function will returns a count of all distinct departments in the region.

     

    Thanks,

    Tony Chain


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, November 15, 2010 5:49 AM
    Moderator