cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report Formula

Former Member
0 Kudos

I have created a formula in Crystal Reports 2013 but I receive the error " boolean is required here" The purpose of the formula is to put the title of each work center next to the work center number. So this is my formula

IF GROUPNAME ({job_routing.work-ctr})= "1400" then "HEAT TREAT" OR

IF GROUPNAME ({job_routing.work-ctr})= "1410" then"OV PLATING-3DAY"

IF GROUPNAME ({job_routing.work-ctr})= "1415" then "OV GRIND" OR

IF GROUPNAME ({job_routing.work-ctr})= "1425" then"SANDBLAST-3DAY"

IF GROUPNAME ({job_routing.work-ctr})= "1450" then "OV WELD" OR

IF GROUPNAME ({job_routing.work-ctr})= "1455" then"OV MISC"

ELSE ""

The editor suggest a boolean be put where I have the red lettering. However i am not sure what boolean it wants because none of them seem like they belong at that point.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Lenore,

Replace all the 'OR' with Else

-Abhilash

Answers (2)

Answers (2)

Former Member
0 Kudos

thank you for your help Kumar. I replaced or with else and it now works.

former_member292966
Active Contributor
0 Kudos

Hi Lenore,

I'm not a fan of multiple If-Else formulas.  It gets confusing balancing the Elses with the Ifs.  I prefer using the Select like: 

Select GROUPNAME ({job_routing.work-ctr})

     Case "1400": "HEAT TREAT"

     Case "1410": "OV PLATING-3DAY"

     Case "1415": "OV GRIND"

     Case "1420": "SANDBLAST-3DAY"

     Case "1450": "OV WELD"

     Case "1455": "OV MISC"

     Default: "";

This will do what your If-Else statement does but I just find it easier to code and read. 

Good luck,

Brian