Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Division by zero Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: Division by zero
    Posted: 26 Nov 2012 at 7:35am
Every once in a while there is a 0 thrown into this formula. Is there any way to get around the error:

Sum ({@fees w/o transfer}, {billing_tx_charge_detail.GUARANTOR_ID})/Sum ({@duration in hours}, {billing_tx_charge_detail.GUARANTOR_ID})
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Nov 2012 at 7:43am
Try this:
 
If Sum ({@duration in hours}, {billing_tx_charge_detail.GUARANTOR_ID}) <> 0 then
Sum ({@fees w/o transfer}, {billing_tx_charge_detail.GUARANTOR_ID})/Sum ({@duration in hours}, {billing_tx_charge_detail.GUARANTOR_ID})
else 0
 
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.