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

Issue with the IFF()

1 Answer 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phillip Foster
Top achievements
Rank 1
Phillip Foster asked on 13 Feb 2012, 07:40 PM
It seems that the IFF evaluate everything in the (), regardless of the if results, and then returns the appropriate ones. This is causing an issue with this:

= IIf(Fields.Calls =0,0,Fields.Sub_Calls/Fields.Calls)*100


If Fields.Calls = 0, the expression errors with "division by zero"

shouldn't the expression ignore that and just return 0?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Feb 2012, 01:10 PM
Hi Phillip,

The reporting engine first evaluates the function parameters and then passes the result values to the function. This means that you need to make sure the parameters of the function are valid statements prior to executing the function. This information is available in the Functions help article.

All the best,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Phillip Foster
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or