Given below is the formula that I am using in Crystal XI. I am getting the data only if I provide all the parameters. Even if one of the parametesr is blank, I am getting the report as blank.
What I am trying to achieve is, even if I give one parameter as blank, I should be able to get the data for the rest the parameters.
Can anyone help or suggest me to solve my issue?
{LSCMCONTRACT_child.CREATEDATE} >= {?Startdate} and {LSCMCONTRACT_child.CREATEDATE} <={?EndDate}
and
(
(if isnull ({?Commodity}) then {LSCMCONTRACT_child.COMMODITY}={LSCMCONTRACT_child.COMMODITY} else {LSCMCONTRACT_child.COMMODITY}={?Commodity})
and (if isnull({?Jurisdiction}) then {LSCMCONTRACT_child.JURISCODE}={LSCMCONTRACT_child.JURISCODE} else{LSCMCONTRACT_child.JURISCODE}={?Jurisdiction})
and (if isnull({?ProductType}) then {LSCMPRODUCT.PRODUCTID}={LSCMPRODUCT.PRODUCTID}else {LSCMPRODUCT.PRODUCTID}={?ProductType} )
and (if isnull({?SalesExecutive}) then {EXESALESREP.SALESREPLASTNAME}={EXESALESREP.SALESREPLASTNAME} else {EXESALESREP.SALESREPLASTNAME}={?SalesExecutive})
)
What I am trying to achieve is, even if I give one parameter as blank, I should be able to get the data for the rest the parameters.
Can anyone help or suggest me to solve my issue?
{LSCMCONTRACT_child.CREATEDATE} >= {?Startdate} and {LSCMCONTRACT_child.CREATEDATE} <={?EndDate}
and
(
(if isnull ({?Commodity}) then {LSCMCONTRACT_child.COMMODITY}={LSCMCONTRACT_child.COMMODITY} else {LSCMCONTRACT_child.COMMODITY}={?Commodity})
and (if isnull({?Jurisdiction}) then {LSCMCONTRACT_child.JURISCODE}={LSCMCONTRACT_child.JURISCODE} else{LSCMCONTRACT_child.JURISCODE}={?Jurisdiction})
and (if isnull({?ProductType}) then {LSCMPRODUCT.PRODUCTID}={LSCMPRODUCT.PRODUCTID}else {LSCMPRODUCT.PRODUCTID}={?ProductType} )
and (if isnull({?SalesExecutive}) then {EXESALESREP.SALESREPLASTNAME}={EXESALESREP.SALESREPLASTNAME} else {EXESALESREP.SALESREPLASTNAME}={?SalesExecutive})
)