Link to home
Start Free TrialLog in
Avatar of Eric Love
Eric Love

asked on

How can I fix my an error in crystal report formula?

In a formula I am comparing 2 number to evaluate if (%a >= %b).  It seems to work - but getting errors some. (Both are numbers)

if {@ratio2}>={@.Goal2} then "Pass"
else "Fail"

RATIO:
local buildit as number
local truncit as number
local strit as string
If {Core_.DE} = 0 Then
     formula = "n/a"
Else
    buildit = ({Core_.NU}/{Core_.DE})*100
    truncit = round(buildit, 0)
    strit = totext(truncit, 0)
    formula = strit
end if
     tonumber(Round(({Core_.NU}/{Core_.DE})*100, 0))


Goal:

If {@Metric Name}= "Orders" Then 0.3 Else
If {@Metric Name}= "Medication" Then 0.4 Else

Thanks
Avatar of Mike McCracken
Mike McCracken

What is the MetricName formula?

The GOAL formula appears to be incomplete.

What errors are you getting?

Can any of the database fields be NULL?

Are you using a mix of VB and Crystal syntax in the formulas?

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial