This is a migrated thread and some comments may be shown as answers.

Is this a known bug?

1 Answer 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul Kater
Top achievements
Rank 1
Paul Kater asked on 20 Jul 2010, 10:17 AM
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'.

1 Answer, 1 is accepted

Sort by
0
Hrisi
Telerik team
answered on 23 Jul 2010, 08:36 AM
Hi Paul Kater,

Your observations confirmed the explanations in the help about Numeric constants. To speed up the aggregate calculations, the argument type is determined from the type of the argument from the first call of the function.

Regards,
Hrisi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Paul Kater
Top achievements
Rank 1
Answers by
Hrisi
Telerik team
Share this question
or