简体   繁体   中英

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.

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. I was hoping it was just a knowledge issue on my part but it appears to be a structural issue with SSRS.

OK So it sounds like you want to have a Subtotal and Grand total?

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. 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. 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.

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