In using Crystal 11, I created the following formula:
(if{?Business_Segment} = '*' then
{USR.USR_UDF_ORGANIZATION} like '*'
else
{USR.USR_UDF_ORGANIZATION} = {?Business_Segment}) and
(if{?Loc_Code} = '*' then
{USR.USR_UDF_LOCAT_CODE}like '*'
else
{USR.USR_UDF_LOCAT_CODE} = {?Loc_Code}) and
(if{?Division_Code}= '*' then
{USR.USR_UDF_DIVISION_CODE} like '*'
else
{USR.USR_UDF_DIVISION_CODE}= {?Division_Code}) and
(if{?JobCode} = '*' then
{USR.USR_UDF_JOB_CODE}like '*'
else
{USR.USR_UDF_JOB_CODE} = {?JobCode}) and
(if{?Department_Code}= '*' then
{USR.USR_UDF_DEPARTMENT_CODE} like '*'
else
{USR.USR_UDF_DEPARTMENT_CODE}= {?Department_Code}) and
(if{?Supervisors User ID}= '*' then
{USR_1.USR_LOGIN} like '*'
else
{USR_1.USR_LOGIN}= {?Supervisors User ID}) AND
{USR.USR_STATUS} = {?Emp_Status};
No records are being returned when a valid entry is used. Any ideas on how to correct and/or improve this formula is greatly appreciated.
Thanks
(if{?Business_Segment} = '*' then
{USR.USR_UDF_ORGANIZATION} like '*'
else
{USR.USR_UDF_ORGANIZATION} = {?Business_Segment}) and
(if{?Loc_Code} = '*' then
{USR.USR_UDF_LOCAT_CODE}like '*'
else
{USR.USR_UDF_LOCAT_CODE} = {?Loc_Code}) and
(if{?Division_Code}= '*' then
{USR.USR_UDF_DIVISION_CODE} like '*'
else
{USR.USR_UDF_DIVISION_CODE}= {?Division_Code}) and
(if{?JobCode} = '*' then
{USR.USR_UDF_JOB_CODE}like '*'
else
{USR.USR_UDF_JOB_CODE} = {?JobCode}) and
(if{?Department_Code}= '*' then
{USR.USR_UDF_DEPARTMENT_CODE} like '*'
else
{USR.USR_UDF_DEPARTMENT_CODE}= {?Department_Code}) and
(if{?Supervisors User ID}= '*' then
{USR_1.USR_LOGIN} like '*'
else
{USR_1.USR_LOGIN}= {?Supervisors User ID}) AND
{USR.USR_STATUS} = {?Emp_Status};
No records are being returned when a valid entry is used. Any ideas on how to correct and/or improve this formula is greatly appreciated.
Thanks