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

Expressions Using /

1 Answer 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 10 Apr 2009, 05:07 PM
For some reason I am struggling to use / in certain circumstances. For instance I have two calculations:

=SUM(IIf(Fields.[DAYS_DELINQUENT]>29, Fields.[PRINCIPAL_BALANCE],0)) / SUM(Fields.[PRINCIPAL_BALANCE])

=SUM(IIf(Fields.[DAYS_DELINQUENT]>29,1,0)) / Count(Fields.[LOAN_NUM])

The first expression works without a problem. The second expression always comes back with an answer of 0.

What I have found for the problem expression is:

1. If I take out the 1 and replace it with a field (but not a report parameter) it then calculates
2. If I take out the / and put in a + then it calculates properly
3. What I put in the divisor is irrelevant based on about a dozen different tested changes (other functions, fields, static number, etc.)

Has anyone experienced this issue or know what I could be doing wrong?

Thanks for any help you can provide

P.S. Working with Telerik Reporting Q1 2009 Solution under Visual Studio 2008

Working with Telerik Reporting Q1 2009 Solution under Visual Studio 2008

1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 13 Apr 2009, 09:50 AM
Hello Mark,

We would assume that the principal_balance field returns float, which works correctly, so simply do the same for the second expression - set the true value for the IIf expression to 1.0.

Best wishes,
Steve
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or