简体   繁体   English

SSRS-汇总的汇总

[英]SSRS - Aggregate of an Aggregate

I am new to SSRS but have plenty of experience with Crystal Reports and am trying to do something that in Crystal is fairly simple but after hours of frustrating research it appears is very difficult in SSRS. 我是SSRS的新手,但是在Crystal Reports方面拥有丰富的经验,并且正在尝试做一些在Crystal中相当简单的事情,但是经过数小时令人沮丧的研究之后,在SSRS中似乎很难。

I have looked at these which bring me close: 我查看了这些使我接近的东西:

Running Total Over Aggregated Data 在汇总数据上运行总计

Aggregate Of Aggregate 骨料骨料

I can semi-successfully obtain a group total but the group total resets to zero at the beginning of each page which isn't what I want. 我可以成功地获得一个组总数,但是该组总数在每页的开头都重置为零,这不是我想要的。

I have two groups in my report the nested group has subtotals which are not totals of the detail data. 我的报表中有两个组,嵌套的组的小计不是明细数据的总计。 How do I create Group Totals for the nested group subtotals? 如何为嵌套的小组小计创建小组总计? I have seen many people asking this question but so far have only been able to successfully create a Report total for the nested group subtotal. 我见过很多人在问这个问题,但到目前为止,只能为嵌套组小计成功创建报告总计。 Can any one point me to a way to solve this? 谁能指出我要解决的方法?

It appears that this area is a regularly encountered problem that has no resolution. 看来这是一个经常遇到的问题,没有解决方法。 I see the same question raised here SSRS Aggregating Aggregates also with no resolution. 我在这里看到了同样的问题SSRS聚合聚合也没有解决方案。 I was hoping it was just a knowledge issue on my part but it appears to be a structural issue with SSRS. 我希望这只是我个人的知识问题,但这似乎是SSRS的结构性问题。

OK So it sounds like you want to have a Subtotal and Grand total? 好的,听起来您希望拥有小计和总计?

https://msdn.microsoft.com/en-us/library/ms170712.aspx https://msdn.microsoft.com/en-us/library/ms170712.aspx

In this example it is the typical sales company first line totals are easy, but the subtotal for the "daily group". 在此示例中,典型的销售公司的第一行总计很容易,但是“每日组”的小计。 Obviously you will have different groups/column names, but I think this is what you are looking for. 显然,您将具有不同的组/列名称,但是我认为这是您想要的。

Right-click the Order cell, point to Add Total, and click After. 右键单击“订单”单元格,指向“添加总计”,然后单击“之后”。 This adds a new row containing sums of the quantity and dollar amount for each day, and the label "Total" in the Order column. 这将添加一个新行,其中包含每天的数量和美元金额的总和,以及“订单”列中的标签“总计”。 Type the word Daily before the word Total in the same cell, so it reads Daily Total. 在同一单元格中的单词Total之前键入Daily,以使其显示为Daily Total。 Select the Daily Total cell, the two Sum cells and the empty cell between them. 选择“每日总计”单元格,两个“求和”单元格以及它们之间的空单元格。 On the Format menu, click Background Color, click Orange, and click OK. 在格式菜单上,单击背景色,单击橙色,然后单击确定。

Then for the grand total 然后总计

Right-click the Date cell, point to Add Total, and click After. 用鼠标右键单击日期单元格,指向添加总计,然后单击之后。 This adds a new row containing sums of the quantity and dollar amount for the entire report, and the Total label in the Date column. 这将添加一个新行,其中包含整个报告的数量和美元金额的总和,以及“日期”列中的“总计”标签。 Type the word Grand before the word Total in the same cell, so it reads Grand Total. 在同一单元格中的单词Total之前键入单词Grand,因此其读数为Grand Total。 Select the Grand Total cell, the two Sum cells and the empty cells between them. 选择“总计”单元格,两个“求和”单元格以及它们之间的空单元格。 On the Format menu, click Background Color, click Light Blue, and click OK. 在格式菜单上,单击背景色,单击浅蓝色,然后单击确定。

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

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