Michael Katz
asked on
Crystal Reports not filtering on all Parameters
Hello Experts,
I am trying to use the Select Expert for 3 Parameters as follows
if {?Rep} = 'ALL' then {ArTrnDetail.Salesperson} like '*'
else {?Rep} = {ArTrnDetail.Salesperson}
and
if {?Warehouse} = 'ALL' then {ArTrnDetail.Warehouse} like '*'
else {ArTrnDetail.Warehouse} = {?Warehouse}
and
if {?Customer} = 'ALL' then {ArTrnDetail.Customer} like '*'
else {ArTrnDetail.Customer} = {?Customer}
the problem is that the last parameter is not working.. If i enter 'ALL' or '00001' all records are being returned..I simply want only records that i have entered
I am trying to use the Select Expert for 3 Parameters as follows
if {?Rep} = 'ALL' then {ArTrnDetail.Salesperson} like '*'
else {?Rep} = {ArTrnDetail.Salesperson}
and
if {?Warehouse} = 'ALL' then {ArTrnDetail.Warehouse} like '*'
else {ArTrnDetail.Warehouse} = {?Warehouse}
and
if {?Customer} = 'ALL' then {ArTrnDetail.Customer} like '*'
else {ArTrnDetail.Customer} = {?Customer}
the problem is that the last parameter is not working.. If i enter 'ALL' or '00001' all records are being returned..I simply want only records that i have entered
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(
if {?Rep} = 'ALL' then 1=1
else {?Rep} = {ArTrnDetail.Salesperson}
)
and
(
if {?Warehouse} = 'ALL' then 1=1
else {ArTrnDetail.Warehouse} = {?Warehouse}
)
and
(
if {?Customer} = 'ALL' then 1=1
else {ArTrnDetail.Customer} = {?Customer}
)