简体   繁体   English

SSRS显示子级别组到父级别组的汇总值

[英]SSRS Display Aggregate Value of Child level group to Parent level group

Calculation 计算

I am trying to get the sum of all the status, which is a child group called "Status1" to Parent group called Assignee. 我正在尝试获取所有状态的总和,这是一个称为“ Status1”的子组,而称为“受让人”的父组。

I have created a report variable called Val and used in a custom code below 我创建了一个名为Val的报告变量,并在下面的自定义代码中使用了

function addData(val as Double, 
                 val1 as Microsoft.ReportingServices.ReportProcessing.OnDemandReportObjectModel.Variable
                )
   val1.value = val1.value + val
   return val
end function

The calculation is working as desired. 计算工作正常。 The sum of all statuses at the last column in the picture has the correct value of 135 at the last row. 图片最后一列的所有状态的总和在最后一行的正确值为135。

I want the sum 135 be shown in Assignee level group.I called the Report Variable like this =Variables!val1.Value on that text field, however, the value is 0.0 instead of 135. 我希望总和135显示在``受让人''级别组中。我在该文本字段上将报表变量称为= Variables!val1.Value,但是该值为0.0而不是135。

it seems like Global Report variable again got flushed, when we try to access it at assignee level group parent group. 当我们尝试在受让人级别组父组中访问全局报表变量时,似乎再次刷新了全局报表变量。

Can someone please help me on how to get 135 in Assignee level ? 有人可以帮我获得受让人水平135吗? I would appreciate your assistance. 多谢您的协助。 I have been struggle to understand the scoping of those child level group to Parent level group relationship. 我一直在努力了解那些孩子级别组与父级别组关系的范围。

What you're looking for is a combination of the Status and the Incident Numbers. 您要查找的是状态和事件编号的组合。 You can get the distinct count at that level by combining the two like this: 您可以通过将两个像这样组合来获得该级别的非重复计数:

=CountDistinct(Fields!Status.Value + CStr(Fields!Incident_number.Value‌​))

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

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