Wednesday, August 17, 2011

HOWTO: Repeat Group CountRows in Details

I had to create a report for a user that provided the number of rows in the group on each row in the group for SSRS 2005. For example, I needed to create a report with first name, last name, and the total count of first names.







fnamelnamecount
AndySmith1
BobSmith2
BobDoe2


The method I ended up using was to create a group to aggregate by first names, then used the CountRows(scope) [NOTE: default table1_Group1] is to count the rows in the group. Finally, delete row [NOTE: not delete group].

Another method is to create the group in the table properties [Groups Tab > Add...]. This is where you can also edit the group list from the above method because you can no longer access it quickly from the table after deleting the row.

Although the second method is cleaner, I left the first method in because that was the process I figured to get it to work then couldn't figure a way to get back to the group list. I just hope this either helps someone or that someone can provide a better process to do the reporting.

No comments:

Post a Comment