This is the select criteria for the sub-report. The sub-report parameter values are populated from the container reports param values.
-----------------------------
(if {?Pm-?Select Fragrances} <> "ALL" then ({IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE30} = {?Pm-?Select Fragrances}or
{IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE20} = {?Pm-?Select Fragrances} or
{IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE_40} = {?Pm-?Select Fragrances} or
{IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE10} = {?Pm-?Select Fragrances})) and
(if {?Pm-?Style} <> "ALL" then {IM_90_UDF_IM_Masterfile.LB_UDF_IMH_STYLE} = {?Pm-?Style} else {?Pm-?Style} = "ALL" and
(if {?Pm-?CountryOrigin} <>"ALL" then {IM_90_UDF_IM_Masterfile.LB_UDF_IMH_COUNTRY_ORIGIN} = {?Pm-?CountryOrigin} else {?Pm-?CountryOrigin} = "ALL" ) and
{Component.InvoiceDate} >= {?Pm-?Beginning Date} and
{Component.InvoiceDate} <= {?Pm-?Ending Date}
-------------------------------
Because we have so many values in the fragrance field, there are four fields for the same thing.
I have an alomst identical select criteria in the container report and it work perfectly. But for the subreport, if a fragrance value is not chosen- then no records returned. But as long as a fragrance is chosen (and not left to ALL) then all other criteria work.
You may need more info, I was just trying to keep it simple. As the report is kinda convoluted.
Thanks,
Sunny
-----------------------------
(if {?Pm-?Select Fragrances} <> "ALL" then ({IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE30} = {?Pm-?Select Fragrances}or
{IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE20} = {?Pm-?Select Fragrances} or
{IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE_40} = {?Pm-?Select Fragrances} or
{IM_90_UDF_IM_Masterfile.LB_UDF_IMH_FRAGRANCE10} = {?Pm-?Select Fragrances})) and
(if {?Pm-?Style} <> "ALL" then {IM_90_UDF_IM_Masterfile.LB_UDF_IMH_STYLE} = {?Pm-?Style} else {?Pm-?Style} = "ALL" and
(if {?Pm-?CountryOrigin} <>"ALL" then {IM_90_UDF_IM_Masterfile.LB_UDF_IMH_COUNTRY_ORIGIN} = {?Pm-?CountryOrigin} else {?Pm-?CountryOrigin} = "ALL" ) and
{Component.InvoiceDate} >= {?Pm-?Beginning Date} and
{Component.InvoiceDate} <= {?Pm-?Ending Date}
-------------------------------
Because we have so many values in the fragrance field, there are four fields for the same thing.
I have an alomst identical select criteria in the container report and it work perfectly. But for the subreport, if a fragrance value is not chosen- then no records returned. But as long as a fragrance is chosen (and not left to ALL) then all other criteria work.
You may need more info, I was just trying to keep it simple. As the report is kinda convoluted.
Thanks,
Sunny