SSRS 2005 矩阵报告 - 编辑总计
这看起来似乎应该很简单,但事实并非如此。
在 SSRS 2005 中,我编写了一个矩阵报告并添加了一些字段,其中一个字段的公式为:If (x / y >= n, 1, 0)。我将这个字段称为“准确性”。该报告汇总了许多个人的这一字段,然后持续了几天。
理想情况下,我想要一个小计,给出“准确性”数字的总和(因此我们可以说我们今天有 n 个人是准确的)。但是,小计计算 x 和 y 总计的公式。小计永远只会是 1 或 0。
关于如何获得矩阵报告上显示的准确度计数,有什么想法吗?我尝试过按照 Sum(accuracy) 和 Count(accuracy) 创建各种字段 - 这些字段在运行报告时返回错误。
谢谢!
This seems as though it should be simple, but appears not to be.
In SSRS 2005 I've written a matrix report and added some fields, one of which has the formula: If (x / y >= n, 1, 0). I've called this field 'Accuracy'. The report aggregates this field across a number of individuals and then for a number of days.
Ideally I want a subtotal that gives a sum of the 'Accuracy' figures (so we can say we had n people who were accurate today). However, the subtotal calculates the formula for the totals of x and y. Subtotals is only ever going to be 1 or 0.
Any ideas as to how I can get a Count of Accuracy displayed on the matrix report? I've tried creating various fields along the lines of Sum(accuracy) and Count(accuracy) - these return an error when the report is run.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许报告将 0 和 1 表现为布尔值。您可以创建一个 dll 来为您完成此工作并引用您的报告并使用 dll 中存在的用于此工作的方法。
maybe report behaves 0 and 1 as a boolean value. you can make a dll that do this work for you and reference to your report and use the methods that exist for this work in dll.
尝试使用运行值。您可以将表达式放在其中或报告代码块中,然后调用它。
=RunningValue(要计数的内容、总和、范围)
=RunningValue(Fields!Cost.Value、Sum、Nothing)
更多信息:
http://msdn.microsoft.com/en-us/library/ms159136.aspx
希望有帮助。
Try using the running value. You could put the expression inside it or inside the report code block and just call it.
=RunningValue(what to count, sum, scope)
=RunningValue(Fields!Cost.Value, Sum, Nothing)
More info here:
http://msdn.microsoft.com/en-us/library/ms159136.aspx
Hope it helps.