Crystal Reports Divide By Zero

Posted on 2009-12-17
Last Modified: 2012-05-08
I am getting a divide by zero error on the following syntax.  Any help would be appreciated.

else if {ALM_CO_SALES\\.SERIES_ID} = 'CR' then 0
else {@fDiscountDollars}/({ALM_CO_SALES\\.SALE_UNIT_PRICE}*{ALM_CO_SALES\\.INVOICED_QTY}-{@fDiscountDollars})
Question by:LRI1
    1 Comment
    LVL 13

    Accepted Solution

    if {ALM_CO_SALES\\.NET_CURR_AMOUNT}=0 then 0
    else if {ALM_CO_SALES\\.SERIES_ID} = 'CR' then 0
    else if {ALM_CO_SALES\\.SALE_UNIT_PRICE}*{ALM_CO_SALES\\.INVOICED_QTY}-{@fDiscountDollars} = 0 then 0
    else {@fDiscountDollars}/({ALM_CO_SALES\\.SALE_UNIT_PRICE}*{ALM_CO_SALES\\.INVOICED_QTY}-{@fDiscountDollars})

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now