简体   繁体   中英

SSRS count of rows within each group

I have a report that will show several groups of details records on the page. I would like to order them so that the groups with more rows are first. Does anyone know what formula should show me the details row count per group? I tried =CountRows(MainGroup) but that errored.

设计视图

带行数的输出

If you include a scope name in any expression, it has to be enclosed in quotes and is case sensitive, so in your case it's just a case of adding the quotes...

=CountRows("MainGroup")

Note: If the expression sits in the "MainGroup" row(s) anyway, then there is no need to specify the scope so =CountRows() would return the same results as when no scope is specified, the current scope is used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM