简体   繁体   English

SSRS相邻组小计

[英]SSRS Adjacent groups subtotals

I'm having issues to show subtotals for adjacent groups which are inside of a parent group. 我在显示父组内相邻组的小计时遇到问题。 The grouping structure is something like this: 分组结构是这样的:

ParentGroup1 : 20

    ChildGroup1 : 8
    ChildGroup2 : 8
    *TOTAL FOR ChildGroup3* : 4
        ChildGroup3.1 : 2
        ChildGroup3.1 : 2

ParentGroup2

I already have the grouping structure , with three adjacent groups for each of the child groups. 我已经有了分组结构,每个子组都有三个相邻的组。 When I try to add a total for ChildGroup3 , it adds me row before the group with the expressions needed. 当我尝试为ChildGroup3添加总计时,它将在包含所需表达式的组前添加行。 However, it doesn't take into account the filters that I have for ChildGroup3. 但是,它没有考虑到我为ChildGroup3使用的过滤器。 It shows me the values , grouping by ParentGroup1. 它显示给我值,按ParentGroup1分组。 This meaning that it shows me TOTAL FOR ChildGroup3 : 20 , instead of 4. 这意味着它向我显示TOTAL FOR ChildGroup3 :20,而不是4。

Any idea of how should I add the Total rows so that it sums 4, instead of 20? 关于如何将“总计”行相加,使其总和为4而不是20的任何想法? Adding totals for the group doesn't work as expected. 无法为该组添加总计。 Also, I can't add a footer to the group, since the options appears disabled every time I add a new group. 另外,我无法将页脚添加到组中,因为每次添加新组时,这些选项都会被禁用。

Thanks in advance. 提前致谢。

I solved this by adding an additional parent group for ChildGroup3. 我通过为ChildGroup3添加另一个父组来解决此问题。 The additional parent group was created based on the value of a calculated field that I added to the Dataset , to differentiate the items within this group from the other items of the other groups.Then, for this new parent group it allowed me to add a header and I could add my subtotal there :) 根据我添加到Dataset中的计算字段的值创建了另一个父组,以区分该组中的项目与其他组中的其他项目。然后,对于这个新的父组,它允许我添加一个标头,我可以在其中添加小计:)

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

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