Hi...
I need some help in creating a Saved Data Selection formula. The data source is a SQL Server Stored Procedure which returns a number of fields including 16 'flag' fields which can contain either a 0 or a 1.
The client wants to select which 'flag' fields will be used to filter the report, interactively changing the selection(s).
Any number of fields could be selected, or just 1.
The parameter has values 1-16 along with a description. The description is what the user sees. The parameter is named 'Indicator'
I'm stumbling over the fact that the formula has to return a boolean.... I tried:
if not hasvalue({?Indicator}) or {?Indicator}=0 then 1=1;
if hasvalue({?Indicator}) and {?Indicator} = 1 and {p_rpt_Customer_AutoHigh.is_314a}
or hasvalue({?Indicator}) and {?Indicator} = 2 and {p_rpt_Customer_AutoHigh.is_auto}
or hasvalue({?Indicator}) and {?Indicator} = 3 and {p_rpt_Customer_AutoHigh.is_autohigh_update}
etc.....
then 1 = 1
else 1=0;
but I'm not certain how to construct the logic because at the end of all this, I need a THEN... which makes no sense...
I've created Saved Data Selects before, but there were specific tests that were applied, for examplde....
if hasvalue({?Parameter}) and {?Parameter}=1 then {field) in LastFullWeek
These were discrete user selections, not multiple selections, and the 'test' was concrete - this in there!
Any help you could provide would be welcome....