Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Value Parameter in CR8

Status
Not open for further replies.

Hexonx

Programmer
Jan 10, 2001
102
US
My report is built on MS SQL Server 7.0 stored proc.

One parameter receives a comma-delimited list of values that becomes a selection filter inside the proc. CR ParameterFieldDefinition.AddCurrentValue can only take values up to 255 chars in length (I need to pass much more than this).

I tried this:

Rpt.ParameterFields(1).EnableMultipleValues = True

Dim arr As Variant
arr = Split(sInvestmentIDFilter, ",")
For i = 0 To UBound(arr)
Rpt.ParameterFields(1).AddCurrentValue CStr(arr(i))
Next

When I select a single value, that value is sent to the DB properly. When I select multiple values, all values are added (Rpt.ParameterFields(1).NumberOfCurrentValues shows the correct number), but a NULL value is sent to the DB, even though I added only non-null string values.

Has anyone come up with a way to send a long list of values into a report to be passed to a stored proc?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top