Link to home
Start Free TrialLog in
Avatar of LinInDenver
LinInDenverFlag for United States of America

asked on

When using SQL Server 2005 and Crystal Reports XI, how do I change a variable in the SP to accept multiple values from the Report Parameter?

Hello there,
I am an experienced Crystal Developer, but this is my first time using Crystal with a Stored Proc in SQL Server 2005. I have been tasked to change a report paramater to accept multiple values (the parameter currently only accepts a single value). This seemed simple at first, until I realized it is linked into a stored proc. :-)

The variable (@AppID) in the stored proc is a varchar(20).

Does anyone have any suggestions?

Thank you!
Lin
ASKER CERTIFIED SOLUTION
Avatar of BrandonGalderisi
BrandonGalderisi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LinInDenver

ASKER

Thanks guys!! I used a combination of these solutions and am now finalizing the report.

We changed @appid into a larger varchar field to allow multiples. We then found a fn_split function (SQL Server) that accepts a string and a delimiter and converts results into a temp table.

we then used a nested select...
select * from table where appid in (select value from fn_split (@appid, ',')).
Thanks guys!! I used a combination of these solutions and am now finalizing the report.

We changed @appid into a larger varchar field to allow multiples. We then found a fn_split function (SQL Server) that accepts a string and a delimiter and converts results into a temp table.

we then used a nested select...
select * from table where appid in (select value from fn_split (@appid, ',')).