SSRS Calculating counts across row and column groups

限于喜欢 提交于 2019-12-10 12:49:10

问题


I'm building a report of case results with a parent-child grouping on the row group and single column grouping:

  • Parent Row Group: Location
    • Child Row Group: Result
  • Column Group: Month

Running across the report are months in the year, and running down the report are the location and the different result breakdowns for the location in the given month. Looks something like this:

                    Jan     Feb     Total
                    %   #   %   #   %   #
Main Office
        Pass        ?   5   ?   6   55% 11
        Fail        ?   5   ?   4   45% 9
        Total           10      10      20

Other Office
        Pass        ?   3   ?   2   25% 5
        Fail        ?   7   ?   8   75% 15
        Total           10      10      20

I have everything working except for the percentage breakdowns as indicated by the question marks above. I can't seem to get that total (the 10 for each month/location set above) reflected into my expression caclulation. Any ideas on how to setup my groups and variables to properly render these percentages?

Here's my attempts so far:

Count(Fields!Result.Value, "dsResults") = 40

Count(Fields!Result.Value, "LocationRowGroup") = 20

Count(Fields!Result.Value, "ResultRowGroup") = 11 - (for the Main Office/January/Pass cell, which is the total for the whole year for that result)

Count(Fields!Result.Value, "MonthColumnGroup") = 20

SSRS gets the count correct on the total line right, so there must be a way to reproduce that scope within the data cells?


回答1:


I sometimes work around annoying SSRS scope issues by pre-calculating my totals, subtotals and percentages. Take a look at this response (to a different post) for an example. I know it is unsatisfying, but it works: pre-calc values suggestion



来源:https://stackoverflow.com/questions/3006471/ssrs-calculating-counts-across-row-and-column-groups

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!