LinInDenver
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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, ',')).
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, ',')).
ASKER
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, ',')).