Search code examples
vb.netcrystal-reports

Passing Multiple Value to a single Crystal Report Parameter separated with comma


I want to add multiple value to a single crystal report parameter separated with commas. I am able to pass all values of parameter including multiple one from my vb.code to crystal report. Now when I try to download the report it combines the comma separated values in to one. For example, if I pass id 1,2,3 to parameter @id it downloads the report of ID 123 instead of reports of ID 1, 2 and 3

Dim IDS As Integer 
IDS = Request.QueryString("ids")

crReportDocument.SetParameterValue("@ids", ids)

If I write IDs in manually like

 crReportDocument.SetParameterValue("@ids", "1,2,3,4")

it works fine but when the parameter @ids,ids is given it gives me the report of id no 1234 not 1,2,3,4. When i try these parameters in crystal reports application directly it works fine there. It also works fine in sql procedures when i execute that procedure.


Solution

  • Thanks for those who at least viewed my question. changed the datatype of ids from integer to string

    Dim IDS As Integer 
    
    Dim IDS As String 
    

    Solved the Problem. The integer was omitting the comma