Is there anyway you can pass an array parameter into the record selection formula in Crystal R XI.
Basically I have a field in my database that stores values such CA, ME, UK ({a.CatPartMarketCode} below)
I need a parameter where a user can select multiple markets. If the db field stored just one market it would be ok but as it stores multiple values comma separated i'm struggling.
The below works when a user selects just one market but goes wrong when a user tries to select more than 1 market. When there are multiples I can't seem to get an 'or' in.
Can this be done (or something like it!!)?
NumberVar iIndex;
(
if UBound({?Market})= 1 then
instr({a.CatPartMarketCode},{?Market}[1]) > 0
else if UBound({?Market})> 0 then
for iIndex:=1 to UBound({?Market}) do
if iIndex>1 then
instr({a.CatPartMarketCode},{?Market}[iIndex]) > 0
)
Basically I have a field in my database that stores values such CA, ME, UK ({a.CatPartMarketCode} below)
I need a parameter where a user can select multiple markets. If the db field stored just one market it would be ok but as it stores multiple values comma separated i'm struggling.
The below works when a user selects just one market but goes wrong when a user tries to select more than 1 market. When there are multiples I can't seem to get an 'or' in.
Can this be done (or something like it!!)?
NumberVar iIndex;
(
if UBound({?Market})= 1 then
instr({a.CatPartMarketCode},{?Market}[1]) > 0
else if UBound({?Market})> 0 then
for iIndex:=1 to UBound({?Market}) do
if iIndex>1 then
instr({a.CatPartMarketCode},{?Market}[iIndex]) > 0
)