Report Design
 Crystal Reports Forum : Crystal Reports 9, X, XI, 2008, 2011 : Report Design
Message Icon Topic: Division by zero error message Post Reply Post New Topic
Author Message
herman
Newbie
Newbie


Joined: 01 Mar 2011
Location: United States
Online Status: Offline
Posts: 30
Quote herman Replybullet Topic: Division by zero error message
    Posted: 22 Mar 2011 at 6:12am
I'm getting a division by zero error message from this formula.  How do I clean it up?
 
If {Command.exec_broker} = 'ecut'
then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Else if {Command.exec_broker} = 'igrp'
Then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Else if {Command.exec_broker}= 'inca'
Then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Else if {Command.exec_broker} = 'unex'
Then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Thanks,
IP IP Logged
DBlank
Senior Member
Senior Member


Joined: 19 Dec 2008
Online Status: Offline
Posts: 7797
Quote DBlank Replybullet Posted: 22 Mar 2011 at 6:26am
if {#RTotal3rdPartySoftTarget} =0 then 0 else
If {Command.exec_broker} = 'ecut'
then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Else if {Command.exec_broker} = 'igrp'
Then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Else if {Command.exec_broker}= 'inca'
Then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
 
Else if {Command.exec_broker} = 'unex'
Then {#RTotal3rdPartySoft} / {#RTotal3rdPartySoftTarget} * 100
IP IP Logged
herman
Newbie
Newbie


Joined: 01 Mar 2011
Location: United States
Online Status: Offline
Posts: 30
Quote herman Replybullet Posted: 22 Mar 2011 at 7:17am
Thank works perfectly.  Thank you!
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.