Is it possible to have completely independent If statements in one record selection formula?
I am using Crystal 11.5 with a SQL Server 2000 database using ODBC. The datasource for the report is several SQL Server tables, and 4 crystal commands that create lists of values for the parameters, the users will make their parameter choices by selecting from drop-downs.
I have a series of parameters that I want the users to be able to select, and they should be completely independent choices, but it seems like the formula editor is forcing me to nest them.
Here is an example:
IF {?DeptName} = '...All' THEN TRUE
ELSE {SR_TEAM.DEPT_NAME} = {?DeptName}
AND
IF {?Type} = '...All' THEN TRUE
ELSE {RQST.RQST_TYPE_VLU} = {?Type}
AND
IF {?HandlingType} = '...All' THEN TRUE
ELSE {RQST.SPCL_HNDL_TYPE_VLU} = {?HandlingType}
AND
IF {?Region} = '...All' THEN TRUE
ELSE {RQST.LOC_VLU} = {?Region}
This formula doesn't do what I want, if the user chooses '...All' for the DeptName parameter then none of the others even get evaluated. I can't see how Else If's would work, that would treat them as being interdependent as well. I have considered a Select Case, but I am not sure that would work either.
My kingdom for an 'End If'!
I am using Crystal 11.5 with a SQL Server 2000 database using ODBC. The datasource for the report is several SQL Server tables, and 4 crystal commands that create lists of values for the parameters, the users will make their parameter choices by selecting from drop-downs.
I have a series of parameters that I want the users to be able to select, and they should be completely independent choices, but it seems like the formula editor is forcing me to nest them.
Here is an example:
IF {?DeptName} = '...All' THEN TRUE
ELSE {SR_TEAM.DEPT_NAME} = {?DeptName}
AND
IF {?Type} = '...All' THEN TRUE
ELSE {RQST.RQST_TYPE_VLU} = {?Type}
AND
IF {?HandlingType} = '...All' THEN TRUE
ELSE {RQST.SPCL_HNDL_TYPE_VLU} = {?HandlingType}
AND
IF {?Region} = '...All' THEN TRUE
ELSE {RQST.LOC_VLU} = {?Region}
This formula doesn't do what I want, if the user chooses '...All' for the DeptName parameter then none of the others even get evaluated. I can't see how Else If's would work, that would treat them as being interdependent as well. I have considered a Select Case, but I am not sure that would work either.
My kingdom for an 'End If'!