Link to home
Start Free TrialLog in
Avatar of kvrogers
kvrogers

asked on

division by zero when export in Adobe

I have a report where I want to see the percentage of the amt that insurance company paid on the total amt charged.
I originally entered this formula but got a DIVISION BY ZERO error when exporting into Adobe.
 ccur({Archrg99.Ins_Paid}) % ccur({Archrg99.Chrg_Amt})

So, I tried to alter the appointment by entering  this formula but still get the error.
if {Archrg99.Ins_Paid} = "0"
then
0
else
(ccur({Archrg99.Ins_Paid}) % ccur({Archrg99.Chrg_Amt}))

The problem is that some insurance companies have not paid yet so the INS_PAID amount may be zero.  When I check the formula (either one) it says there are no errors and the report runs.  I only get the error when exporting in Adobe.

Can you help.
Kate Rogers
Avatar of Mike McCracken
Mike McCracken

Why are you checking the Ins_Pais amount.  You need to check the Chrg_Amt since that is the field you are dividing by.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To be fair, if the problem was that you were checking Ins_Paid for 0 instead of Chrg_Amt, mlmcc probably deserves most of the credit (and points) for pointing that out first.

 James