views:

209

answers:

2

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!

A: 

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.

masoud ramezani
A: 

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.