In a form I set up this expression:
=sum(iif(Fields.Showcode<>'06',Fields.TotalAmount,0))
To my surprise, a TotalAmount of 13.95 was displayed as 14.00
We discovered that changing the expression to:
=sum(iif(Fields.Showcode<>'06',Fields.TotalAmount,0.00))
produces the proper result. It looks as if the first time the expression evaluates false, the data type of the calculated field is set to the intrinsic type of the else-value, which in this case would be 'int'.
=sum(iif(Fields.Showcode<>'06',Fields.TotalAmount,0))
To my surprise, a TotalAmount of 13.95 was displayed as 14.00
We discovered that changing the expression to:
=sum(iif(Fields.Showcode<>'06',Fields.TotalAmount,0.00))
produces the proper result. It looks as if the first time the expression evaluates false, the data type of the calculated field is set to the intrinsic type of the else-value, which in this case would be 'int'.