
Multiple Parameter Values
Greetings,
I am trying to apply multiple values at runtime to a report parameter that
allows multiple discrete values. Here's the problem. The values are selected
in a list box and split into an array. I want to loop through the array,
assigning the values, then finally export the report. If I explicitly assign
the values the report runs fine. If I loop through the array assigning the
values only the first assigned value is taken. Here's what I am doing.
//THE FOLLOWING CODE ONLY ASSIGNS FIRST ELEMENT OF THE ARRAY
session("oRpt").ParameterFields.GetItemByName("Batch
Number").EnableMultipleValues=true
'set the parameters
for report for i=lbound(batchNumber) to ubound(batchNumber)
session("oRpt").ParameterFields.GetItemByName("Batch
Number").AddCurrentValue(Cstr(batchNumber(i))) batches=batches+
batchNumber(i) + " "
next
//THIS CODE WORKS BUT DOES ME NO GOOD
session("oRpt").ParameterFields.GetItemByName("Batch
Number").AddCurrentValue(Cstr("0206F))
session("oRpt").ParameterFields.GetItemByName("Batch
Number").AddCurrentValue(Cstr("0207F))
session("oRpt").ParameterFields.GetItemByName("Batch
Number").AddCurrentValue(Cstr("0208F))
There is no way of knowing which or how many batches will be selected so I
need to iterate through the array to assign values. Anyone have any ideas or
suggestions? TIA