如何将总计添加到SSRS中的每个组

How to add totals to each group in SSRS

我需要为 SSRS 中的行组中的每个分组提供总计。目前,总计会添加到行组的末尾。

所以,如果我有以下数据:

TeamName    BusinessSegment  PaymentPeriod  BusinessArea      ProductType        PolicyCount201501    Premium201501   
---------------------------  -------------  ----------------  ----------------   ------------------   --------------- 
Office      Non-property     Monthly        Commercial Lines  Sectional Title    0.00                 0.00            
Office1     Non-property     Annual         Commercial Lines  C&I Generic (Web   1.00                 24025.00        
Office1     Non-property     Annual         Commercial Lines  Property Protect   1.00                 24025.00       
Office1     Non-property     Monthly        Commercial Lines  BizzInsure         1.00                 24025.00      
Office1     Non-property     Monthly        Commercial Lines  Sectional Title    1.00                 24025.00       
Office2     Non-property     Annual         Commercial Lines  Property Protect   1.00                 24025.00        
Office2     Non-property     Annual         Commercial Lines  Sectional Title    1.00                 24025.00        
Office2     Non-property     Annual         Commercial Lines  Sectional Title    1.00                 24025.00        
Office2     Non-property     Monthly        Commercial Lines  M&F Commercial B   1.00                 24025.00        
Office2     Non-property     Monthly        Commercial Lines  Sectional Title    1.00                 24025.00  

我希望输出是这样的:

Team Name       Business Segment    Payment Period  Business Area       Product Type    Policy Count 201501     Premium 201501
Office          Non-property        Monthly         Commercial Lines    Sectional Title 0.00                    0.00
                                                    Total                               0.00                    0.00
                                    Monthly Total                                       0.00                    0.00
                Non-property Total                                                      0.00                    0.00
Office Total                                                                            0.00                    0.00
Office1         Non-property        Annual          Commercial Lines    Something1      1.00                    1.00
Office1         Non-property        Annual          Commercial Lines    Something2      1.00                    1.00
                                                    Total                               2.00                    2.00
                                    Annual Total                                        2.00                    2.00
Office1         Non-property        Monthly         Commercial Lines    Something1      0.00                    1.00
Office1         Non-property        Monthly         Commercial Lines    Something2      1.00                    1.00
                                                    Total                               1.00                    2.00
                                    Monthly Total                                       1.00                    2.00
                Non-property Total                                                      3.00                    4.00
Office1 Total                                                                           3.00                    4.00
Office2         Non-property        Annual          Commercial Lines    Something1      0.00                    1.00
Office2         Non-property        Annual          Commercial Lines    Something2      1.00                    1.00
                                                    Total                               1.00                    2.00
                                    Annual Total                                        1.00                    2.00
Office2         Non-property        Monthly         Commercial Lines    Something1      2.00                    1.00
Office2         Non-property        Monthly         Commercial Lines    Something2      1.00                    1.00
                                                    Total                               3.00                    2.00
                                    Monthly Total                                       3.00                    2.00
                Non-property Total                                                      4.00                    4.00
Office2 Total                                                                           4.00                    4.00
Grand Total                                                                             7.00                    8.00

请注意,PaymentPeriod 按 MonthlyAnnually 分组,在 Monthly 之后有总计,在 Annually 之后有总计。 目前,呈现以下内容(注意每个 PaymentPeriod 分组末尾的单个 Annual 总数:

Team Name       Business Segment    Payment Period  Business Area       Product Type    Policy Count 201501     Premium 201501
Office          Non-property        Monthly         Commercial Lines    Sectional Title 0.00                    0.00
                                                    Total                               0.00                    0.00
                                    Monthly Total                                       0.00                    0.00
                Non-property Total                                                      0.00                    0.00
Office Total                                                                            0.00                    0.00
Office1         Non-property        Annual          Commercial Lines    Something1      1.00                    1.00
Office1         Non-property        Annual          Commercial Lines    Something2      1.00                    1.00
                                                    Total                               2.00                    2.00
Office1         Non-property        Monthly         Commercial Lines    Something1      0.00                    1.00
Office1         Non-property        Monthly         Commercial Lines    Something2      1.00                    1.00
                                                    Total                               1.00                    2.00
                                    Annual Total                                        3.00                    4.00
                Non-property Total                                                      3.00                    4.00
Office1 Total                                                                           3.00                    4.00
Office2         Non-property        Annual          Commercial Lines    Something1      0.00                    1.00
Office2         Non-property        Annual          Commercial Lines    Something2      1.00                    1.00
                                                    Total                               1.00                    2.00
Office2         Non-property        Monthly         Commercial Lines    Something1      2.00                    1.00
Office2         Non-property        Monthly         Commercial Lines    Something2      1.00                    1.00
                                                    Total                               3.00                    2.00
                                    Annual Total                                        4.00                    4.00
                Non-property Total                                                      4.00                    4.00
Office2 Total                                                                           4.00                    4.00
Grand Total                                                                             7.00                    8.00

请问我该如何实现?

将另一个子组添加到您的 Payment Period 组并将总计添加到您的第二个组。从第一组的显示中删除列(不删除第一组)。

输出: