Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Divisions by ZERO Post Reply Post New Topic
Author Message
hancorn
Newbie
Newbie
Avatar

Joined: 10 Mar 2009
Online Status: Offline
Posts: 9
Quote hancorn Replybullet Topic: Divisions by ZERO
     Posted: 11 Jan 2010 at 6:12am
Hi guys/girls,

Just wondering if anyone had any thought on how to divide by a ZERO.

Situation is such:

The average no. of jobs logged per month by priority for a Helpdesk report.

I have: (Sum ({@calls logged})/{@no. of days}) as a formaula field. This works great if the "@calls logged" formula field is greater than zero

If this equals zero then it errors when trying to run the report.

Does anyone know of an exception I can put into the report to stop this happening?

Regards
Sean
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 11 Jan 2010 at 9:04am
You would have to check that {@no. of days} is non-zero before doing the division (if statement).   The question then what to do when it is zero.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum