Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula error Post Reply Post New Topic
Author Message
MaggieEscamilla
Newbie
Newbie
Avatar

Joined: 30 Apr 2010
Location: United States
Online Status: Offline
Posts: 2
Quote MaggieEscamilla Replybullet Topic: formula error
     Posted: 30 Apr 2010 at 1:02pm
I created the following formula which works just fine in a report.  When I try to duplicate/copy formula I get the error message "a statement is expencted here" right after the THEN stmt, where it doesn't do it in original formula.  Also now all my if statements seem to be getting the same error (new)  I don't know if I'm burned out on this,but please help with formula
 
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "PA" THEN 1.30
ELSE
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "O" THEN 2.30
ELSE
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "A1" THEN 2.30
ELSE
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "A2" THEN 2.30
ELSE
3.30
 
this is the formula I created and it works fine in the first report but not the second one
maggie
IP IP Logged
SrVickers
Newbie
Newbie


Joined: 25 Jun 2009
Location: United States
Online Status: Offline
Posts: 10
Quote SrVickers Replybullet Posted: 30 Apr 2010 at 5:26pm
Try wrapping quotation marks after  then like below.

IF {PRM_MASTER__EMPLOYEE.Union_Class} = "PA" THEN "1.30"
ELSE
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "O" THEN "2.30"
ELSE
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "A1" THEN "2.30"
ELSE
IF {PRM_MASTER__EMPLOYEE.Union_Class} = "A2" THEN "2.30"
ELSE
"3.30"
Stephen
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 May 2010 at 3:59am
I think you changed the formual type from Crystal to Basic.
Go into the formula and varify or flip the type to Crystal Syntax


Edited by DBlank - 03 May 2010 at 3:59am
IP IP Logged
MaggieEscamilla
Newbie
Newbie
Avatar

Joined: 30 Apr 2010
Location: United States
Online Status: Offline
Posts: 2
Quote MaggieEscamilla Replybullet Posted: 03 May 2010 at 5:17am

THANK YOU!!!

as soon as I read your post, I knew you were right.  I checked my formula and I had flipped the type to basic. Than you so much for replying.
 
 
maggie
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum