Link to home
Start Free TrialLog in
Avatar of sib_user
sib_user

asked on

Help with crystal reports formula editor syntax

I am trying to include a formula in my report to calculate an employee's social security contribution based on a simple if else statement:

if {DataTable3.Expr1} < 70 then
    0.83
elsif {DataTable3.Expr1} < 110 then
    1.95
elseif {DataTable3.Expr1} < 180 then
    3.15
elseif {DataTable3.Expr1} < 220 then
    4.75
elseif {DataTable3.Expr1} < 260 then
    6.35
elseif {DataTable3.Expr1} < 300 then
    7.95
else
    9.55

Problem is that the formula editor doesn't like my syntax.

The new field is called SSContribution.

Will someone please help me to correct the syntax?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of 13598
13598
Flag of United States of America image

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
Avatar of sib_user
sib_user

ASKER

Else if works