Group Row Count

  • Hello

    I have a report which is split into groups and what I am trying yo do is to count the number of rows in each group at the group footer.

    Does anybody know how I can do this? Books online is just not all that helpful!!

  • You want to use the CountRows function. If my report is Employees By Department and my group is named department then in the group footer I would use CountRows(Department) where Department is the name of the group (defines the scope).

  • It still doesnt work for me, where will type this expression in the group footer?

  • Attached is a report that uses ADventureWorks and shows how to use the CountRows function. You will need to unzip it and then you can open it in BIDS.

  • It still doesn't work, even when i have used the correct expression, any other idea's?

  • Hi B-Boy

    Jack is correct, he has given you the correct expression to use and I suspect with his experience that he has given you a fully working report based on AdventureWorks.

    The most popular problem here is that you have the scope wrong within the expression.

    Can you post a copy of your expression.

    Can you post a jpeg of your table group names.

    Regards,

    Nigel West
    UK

  • This is the expression I used: ="Orders Cancelled: " + CountRows("CancelledBy").ToString

    I have also attached a screen shot of the table in BIDS.

  • OK, so I suspect that it is the expression, in particular the part that reads "CancelledBy" which identifies the scope of the function. This should represent the group name and I imagine this is wrong.

    I attached a document to help you track down the group name, because the screen shot you sent just gives me the outline of the table but not group names.

    Good luck,

    Nigel West
    UK

  • Thanks Guys

    Finally got to work, my group name within the expression wasn't the same when I checked the edit group section.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply