Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
HUHU
Starting Member
4 Posts |
Posted - 2013-04-29 : 09:16:42
|
Hi need to populate a multi-valued parameter with a comma separated string value like (1,2,3) in SSRS … i tried with parameter properties by setting values in "Default Values" tab.. am I missing something.. please help .. thanks in advance |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-04-29 : 09:46:31
|
You also need to select the "Allow multiple values" checkbox in the general tab of the Report Parameter Properties. |
|
|
HUHU
Starting Member
4 Posts |
Posted - 2013-04-29 : 10:01:27
|
Hi James, thanks for reply i already set the checkbox to "Allow multiple values" and while fetching records i am able to send the selected items seamlessly... but whenever i want to bind again with comma separated string values in "Default values" tab its not working ... :( |
|
|
HUHU
Starting Member
4 Posts |
Posted - 2013-04-29 : 10:06:33
|
i tried an expression too in "Default Value" tab =Split(First(Fields!ColumnValue.Value, "dsImageDescription"),",")where ColumnValue is the comma seperated string coming from a stored procedure [dataset name : dsImageDescription] As the value selected renders as an array i just gave an wild try. but it didnt work out for me too .. :( |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-04-29 : 10:20:00
|
When you call the stored procedure, the parameter values are sent as comma-separated values. However, SSRS does not provide a feature for output parameters. So you cannot retrieve those parameters (be they input only or input/output parameters) back into your report. So your options that I can think of are:1. Send the comma-separated values back to the report as a column in the record set returned (or create another dataset just for this purpose)2. Concatenate the parameter values in the report yourself with commas separating them. |
|
|
HUHU
Starting Member
4 Posts |
Posted - 2013-04-29 : 10:36:28
|
I just created a function where i send the comma separated string and get a ListItem column with all values row wise. What i am doing now 1. Get the value from dataset and assign it into a text parameter.2. Send the text field value in newly created function.3. Point the function's outcome to "Default Values" tabI am getting an exception saying An error occur during local report processing.The definition of the report 'NewReport' is invalid.A value expression is used for the report Parameter 'ColumnName' refers to a field.Fields can not be used in report parameter expression. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-30 : 04:52:48
|
quote: Originally posted by HUHU Hi James, thanks for reply i already set the checkbox to "Allow multiple values" and while fetching records i am able to send the selected items seamlessly... but whenever i want to bind again with comma separated string values in "Default values" tab its not working ... :(
why not generated comma separated list from database itself in query and bring? then you can use this query in a dataset and assign it to your ssrs parameter------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|