Multiple Parameter Values 
Author Message
 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



Mon, 25 Jul 2005 08:23:30 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Printing Multiples Parameter Values

2. Multiple Parameter Values

3. Multiple Parameter Values

4. How to pass single, multiple or null parameter value(s) to multiple queries

5. passing multiple values parameter ??

6. (ReplaceSelectionFormula) OR Multiple Value Parameters?

7. Passing (multiple) discrete values to a parameter

8. Crystal and Parameters with multiple values

9. Linking subreport to main report using multiple-value or range parameters

10. URL Command with parameter fields with multiple values

11. Pass Multiple value to a parameter in VB

12. multiple valued parameter!

 

 
Powered by phpBB® Forum Software