all groups > sql server reporting services > september 2004 >
You're in the

sql server reporting services

group:

Cumulative Total



Cumulative Total May Liu
9/15/2004 5:33:28 PM
sql server reporting services: I try to sum a value in the TABLE FOOTER if this record falls into a
particular condition. But the result is zero.
The formular is as follow:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
Fields!CN_WGT.Value, 0))

If I the formular like this:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP", 1, 0))
It works !!!

Re: Cumulative Total Robert Bruckner [MSFT]
9/15/2004 9:15:03 PM
What's the datatype of Fields!CN_WGT.Value? I would assume it is not a
System.Int32, but 0 is a System.Int32.

You might want to try 0.0 instead of 0:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
Fields!CN_WGT.Value, 0.0))

Alternatively:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
CDbl(Fields!CN_WGT.Value), 0.0))

--
This posting is provided "AS IS" with no warranties, and confers no rights.




[quoted text, click to view]

Re: Cumulative Total May Liu
9/15/2004 11:05:01 PM
Thanks, it works now !!!

[quoted text, click to view]
AddThis Social Bookmark Button