Skip to Content
avatar image
Former Member

Crystal Reports 2013 - Division by zero.

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 30, 2017 at 02:16 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 31, 2017 at 09:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded