简体   繁体   English

SSRS 2008中分组值的总行数

[英]Total Row Count for Grouped Values in SSRS 2008

I have a report that displays names of all accounts and activities performed under each of them. 我有一个报告,显示在每个帐户下执行的所有帐户和活动的名称。

AccountName: ABC Corp Activity: Installation AccountName:ABC Corp活动:安装

I want to group the AccountName and get the total number of Activities performed for each account. 我想对AccountName进行分组,并获取为每个帐户执行的活动总数。

ABC Corp: 1 ABC公司:1

How can I accomplish this in SSRS 2008? 如何在SSRS 2008中实现这一目标? I am able to group the AccountName but I need a way to convert the Activity column to int so I can get the total. 我能够对AccountName进行分组,但我需要一种方法将Activity列转换为int,这样我就可以得到总数。

Help appreciated! 帮助赞赏!

You can add a total row for the Account group and give your total field the expression CountRows("AccountGroupName") , to count the Activity detail rows for each Account group. 您可以为“帐户”组添加总行,并为总字段提供表达式CountRows("AccountGroupName") ,以计算每个“帐户”组的“活动”详细信息行。

You can also put the total value at the level of the group row / group header. 您还可以将总值放在组行/组标题的级别。

More details about Function CountRows could be found here: http://msdn.microsoft.com/en-us/library/ms156330(v=sql.100).aspx 有关Function CountRows更多详细信息,请访问: http//msdn.microsoft.com/en-us/library/ms156330( CountRows .aspx

您可以将CountRows()放在组中的表达式中,它将显示每个分组的行数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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