CF Report Builder Calculated Field Error

96 views Asked by At

I am working on an existing Cold Fusion report and am getting an error when trying to create a calculated field.

When I use the following expression in the field:

    IIF(calc.WI_TOT_AGT_CNT_MTD NEQ 0 AND CALC.WI_TOT_AGT_CNT_MTD NEQ '',
'(CALC.WI_TOT_SRVY_CNT_MTD / CALC.WI_TOT_AGT_CNT_MTD)',
DE('-'))

it runs fine. The problem is when I update this expression to use a different calculated expression:

IIF(calc.FL_AGT_CNT_TOTAL NEQ 0 AND CALC.WI_TOT_AGT_CNT_MTD NEQ '',
'(CALC.WI_TOT_SRVY_CNT_MTD / CALC.WI_TOT_AGT_CNT_MTD)',
DE('-'))

I get an error. I updated just one piece at a time to see if I can pinpoint what is causing the error. I can pass "Calc.FL_AGT_CNT_TOTAL" into the report and verify that it returns 0 as the value. I have verified that calc.FL_AGT_CNT_TOTAL is the same data type as calc.WI_TOT_SRVY_CNT_MTD.

The error I am getting is just a generic "An error has occured, please contact administrator", and I can't figure out where in this cold fusion application the error is being redirected from. Any ideas as to what could be causing this calculation to fail? Thanks!

1

There are 1 answers

0
user2921015 On

The Calculated Field was a float data type but it was trying to pass the '-', which is a string.