Skip to Content
0

Crystal Reports 2013 - Division by zero.

Oct 30, 2017 at 01:31 PM

32

avatar image
Former Member

I'm unable to divide two decimal attribute in Crystal Reports 2013, it always give me "Division by zero." error.

Field 1 value is 1,960.00

Field 2 value is 20.00

When I set the formula to {Field 1} / {Field 2}, I will received "Division by zero." error. Anyone can assist me?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Tammy Powlas
Oct 30, 2017 at 02:16 PM
0

Axell - I like Don's suggestion in this thread, to see if a field is NULL - see https://archive.sap.com/discussions/thread/3156794

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Oct 31, 2017 at 09:47 AM
0

Hi Axell,

1. Edit the formula. Once the formula editor opens, look for a drop-down on the top called 'Exceptions for Nulls'. Change it to 'Default Values for Nulls'.

2. Modify the code as:

IF {Field 2} = 0 then 0 else

{Field 1} / {Field 2}

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded