Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum of a group - aggregate function error

Status
Not open for further replies.

Jcfx

MIS
Oct 8, 2004
134
US
RS 2005, great plains 8
I have this formula in my detail as a column:


Code:
= IIf(Fields!AGNGBUKT.Value = 1,Fields!CURTRXAM.Value,0.00)

Which gives me detail as follows:
Current
0.00
0.00
4.55
1.25
0.00

I am grouping by customer and I want to sum this field at the group level.

Code:
=Sum(
 IIf(Fields!AGNGBUKT.Value = 1,Fields!CURTRXAM.Value,0.00)
 ,"Customer")

I am getting the following error:
[rsAggregateOfMixedDataTypes] The Value expression for the textbox ‘CustCurrentSum’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type.


Can someone please explain the best way to approach a sum at the group level on comparison data? IE the results of a manual crosstab.

This 'IIF' does not show as a calculated field instead it comes up as a ReportItem <order of evaluation?> yet I still cannot do anything with it at the group level either.

Thank you for any assistance

Julie
CR 9,10 CE10 Sql DB
 
Found the answer.


=Sum(
IIf(Fields!AGNGBUKT.Value = 1,Cinst(Fields!CURTRXAM.Value),0.00)
,"Customer")

Julie
CR 9,10 CE10 Sql DB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top