Is it possible to have a selection formula based on a string array?
I need to create a report which has a formula that specifies an array of product codes which the selection formula bases the records in the report on.
I have tried putting a loop into the selection formula that should check each item in the array, but the report is listing all records regardless of a matching product code.
This is what is in the selection formula at the moment...
NumberVar i;
Global StringVar Array JO;
for i := 1 to ubound(JO) do
(
If {PRODUCTS.Product} in JO
then {PRODUCTS.Product} = JO
)
(The above works fine in a normal formula)
If this is not possible, then can anyone suggest an alternative way of doing this? The report needs to be written this way as it needs to work for many different customers who all have different product codes for the same items. I want to avoid parameters etc. as once the formula is set for each customer, it never needs changing and I want it to remain as 'hidden' as possible.
(CR XI on SQL 2005 DB)
I need to create a report which has a formula that specifies an array of product codes which the selection formula bases the records in the report on.
I have tried putting a loop into the selection formula that should check each item in the array, but the report is listing all records regardless of a matching product code.
This is what is in the selection formula at the moment...
NumberVar i;
Global StringVar Array JO;
for i := 1 to ubound(JO) do
(
If {PRODUCTS.Product} in JO
then {PRODUCTS.Product} = JO
)
(The above works fine in a normal formula)
If this is not possible, then can anyone suggest an alternative way of doing this? The report needs to be written this way as it needs to work for many different customers who all have different product codes for the same items. I want to avoid parameters etc. as once the formula is set for each customer, it never needs changing and I want it to remain as 'hidden' as possible.
(CR XI on SQL 2005 DB)