SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Need to populate Multi valued parameter in SSRS
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

HUHU
Starting Member

USA
4 Posts

Posted - 04/29/2013 :  09:16:42  Show Profile  Reply with Quote
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

Edited by - HUHU on 04/29/2013 09:34:25

James K
Flowing Fount of Yak Knowledge

3744 Posts

Posted - 04/29/2013 :  09:46:31  Show Profile  Reply with Quote
You also need to select the "Allow multiple values" checkbox in the general tab of the Report Parameter Properties.
Go to Top of Page

HUHU
Starting Member

USA
4 Posts

Posted - 04/29/2013 :  10:01:27  Show Profile  Reply with Quote
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 ... :(
Go to Top of Page

HUHU
Starting Member

USA
4 Posts

Posted - 04/29/2013 :  10:06:33  Show Profile  Reply with Quote
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 .. :(
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3744 Posts

Posted - 04/29/2013 :  10:20:00  Show Profile  Reply with Quote
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.
Go to Top of Page

HUHU
Starting Member

USA
4 Posts

Posted - 04/29/2013 :  10:36:28  Show Profile  Reply with Quote
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" tab

I 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.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 04/30/2013 :  04:52:48  Show Profile  Reply with Quote
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 MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000