on 09-30-2015 2:38 PM
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.
Hi Lenore,
Replace all the 'OR' with Else
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you for your help Kumar. I replaced or with else and it now works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.