-
April 11th, 2014, 04:55 AM
#1
Division by Zero error
I am receiving a division by zero error in relation to the following:-
(Sum ({@Payments},{aps_group.code})/Sum ({@Invoice},{aps_group.code}))*100
It is strange, as the report was written some time ago and this error has only just appeared.
I am not particulary au fait with Crystal Reports, so a laymans response would be appreciated.
I am using Crystal Reports XI if that helps.
Thank you in advance.
BASS
-
April 15th, 2014, 09:27 PM
#2
Re: Division by Zero error
Code:
If Sum ({@Invoice},{aps_group.code})) <> 0 Then
(Sum ({@Payments},{aps_group.code})/Sum ({@Invoice},{aps_group.code}))*100
Else
0
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
February 14th, 2015, 03:00 PM
#3
Re: Division by Zero error
If the result should equal 100% for no issues, simply force the formula to display 100 if Zero result.
Code:
If Sum ({@Invoice},{aps_group.code})) <> 0 Then
(Sum ({@Payments},{aps_group.code})/Sum ({@Invoice},{aps_group.code}))*100
Else
100
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|