开发者

conditional sum not working on certain datatypes

I have a c开发者_JAVA技巧onditional sum in my grouping

=sum(iif(Fields!Letter.Value="Service",0,Fields!Mailed.Value))

I keep getting the #error on half the fields. There all numbers. In my proc im calling the fields that are erroring outare doing a calculation. I tried putting those into a subquery and calling and it errored out. Im not sure where to go from here.

Any ideas on why this may be and how to fix it?


This snippet shows a solution:

=Sum(iif(Fields!Status.value = "Value a", Cdbl(Fields!Payment.Value), 0.0))

Worked for me. Apparently you have to set the same data type in both results either true or false.


IIf Condtion Returns as object .Parse the object to Numeric like decimal or integer and sum .


The only thing I can think of is to check that data types that you are using

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜