Thursday, March 8, 2012

aggregate functions vs. non-numeric data

RS doesn't like this expression that's supposed to total up all the debit values in my ledger:

=RunningValue( iif(Fields!Amount.Value < 1, 0, Fields!Amount.Value), Sum, Nothing)

I'm getting this error :

The value expression for the textbox ‘APTotal’ uses a numeric aggregate function on data that is not numeric. Numeric aggregate functions (Sum, Avg, StDev, Var, StDevP, and VarP) can only aggregate numeric data.

I take issue with its saying my data is not numeric. The matching field in the database is of type money.

Any thoughts on what i'm doing wrong?


Ian Pert
CMS Software, Business Integenct UnitOh, got it. Problem wasn't my Fields!Amount.Value, but simply that 0 wasn't the same datatype. Replaced 0 with Nothing, like so

=RunningValue( iif(Fields!Amount.Value < 1, Nothing, Fields!Amount.Value), Sum, Nothing)

And it worked like a charm.

No comments:

Post a Comment