Divide by zero error

MKhan

New Member
I am using Actuate e.Report Designer Professional 8 Fix1.

In one of my report, I have a Currency Control "Content-PctCompJTDEAC". In it properties, I have defined following ValueExp:

IIf((JTDHrs+EACHrs) = 0,0, (JTDHrs * 100)/(JTDHrs+ACHrs))

where JTDHrs and EACHrs are query or DataRows coulmns.

But I am getting Divide by zero error when I run my report.

Any idea what is causing this error.

Thanks.
 

tkelly1006

New Member
I have gotten this error using Crystal Reports. I've actually had to add a line like this for every field used in the formula:

If{field1}=0 then 0 else {field1}
 

sreenivasreddya

New Member
Hi .. First thing i recommed you .. instead of writting in value exp , override onrow or start method of that control.

one more good practice is ... better to trim the data that you fetch from the database before you read it..
 

vavsey

New Member
Hi,

Search in AcHelp for function SafeDivide(). Had the same problem a long time ago. This function is the only right way.
 
Top