在 SSRS 中创建数据集视图
我希望这不是太简单,但我有一个报告使用这种布局检索行:
I hope this isn't too simple, but I have a report retrieves rows using this layout:
AccountType AccountHolder AccountBalance
----------- ------------- --------------
SVG A $ 100.00
LNS A $ 300.00
HEL A $ 150.00
SVG B $ 50.00
SVG C $ 900.00
HEL C $ 350.00
该报告以多种方式总结了上述数据,但是我被要求提供 AccountHolder 为其所有帐户提供的帐户余额总和,主要产生以下输出:
The report summarizes the data above in a variety of ways, however I've been asked to provide a Sum of AccountBalances by AccountHolder for all of their accounts, essentially resulting in the following output:
AccountHolder AccountBalance
------------- --------------
A $ 550.00
B $ 50.00
C $1250.00
由于每行之间的 AccountType 不同,因此无法按照我想要的方式对行进行分组.
Since the AccountType differs between each row, its not possible to group the rows in the way I want.
我真的不想创建另一个数据集来检索没有列的相同数据,主要是因为原始存储过程需要 40 分钟才能运行,而且我不想将运行此报告所需的时间加倍.
I would really prefer not to create another dataset to retrieve identical data without the column, mainly because the original stored procedure takes 40 minutes to run and I don't want to double the amount of time it takes to run this report.
我可以强制 SSRS 忽略 AccountType 列吗?或者无需额外访问数据库即可创建数据集视图?
您不需要需要创建一个新数据集来对您已有的现有数据进行分组.
You do NOT need to create a new dataset to group existing data you already have.
对于您的特定情况,这是一个简单的 3 步过程.
For your particular case, it's a simple 3 step process.
添加一个新表并插入一个新组
Add a new table and insert a new Group
选择分组依据的字段
Select a field you are grouping by
这是结果(警告:看起来非常棒)
*
Here is the result (WARNING: looks quite awesome)
*