how to get report parameter by pasing multiple paramters values SSRS - reporting-services

i m using ReportingService2005 webservice to get report parameter , but i want to get parameter by passing multiple values for same parameter
like i have 3 values of one field to which i want to filter other parameter record
GetReportParameters(ReportPath, null, false, values, null);
here value is ParameterValue object , and this have name and value property
that means it take one value for each parameter
can any one tell me how can i set multiple parameter values in GetReportParameters()
thanks in advance

Create an array of ParameterValue objects, and pass this array to the GetReportParameters method.
This article has information on using GetReportParameters to retrieve values of cascading parameters.

Related

Multiple values to pass in a subreport SSRS

Can I use the below expression to pass multiple value in a parameter in subreport?
=Join(LookupSet(1,1,Fields!Name.Value, "DatasetName")," / ")
Will the Join and LookupSet function work in prameter value expression?
No your expression won't work. The Available Values for the Parameter are expecting a single record at a time.
I would create a parameter in the main report with the dataset as DatasetName with the Value of Name. You can set that to Hidden and don't need to use it.
Use that parameter to link to your sub report's parameter.
That should have the same functionality as what you want and would be faster that using the JOIN/LOOKUPSET.
As long as the receiving parameter in the subreport is set to "allow multiple values", you should be able to pass in the lookupset array itself without needing the JOIN function at all.

Unable to get the Filtered Values when passing the parameter into filter Value in SSRS

I have multi Valued Parameter which have list of values in the Drop down .
I am trying to apply filter on the data set.My requirement is when i choose a value from Drop down,it should be filtered on that value.
I am using the below value in my DATA SET Filters
=join(Parameters!TierStatus.Value,",")
But i am getting an Error like
"Failed to evaluate the FilterValues of the Dataset"
How can write a filter expression based on the multi valued parameter
If you are using "IN" as the operator, you should be able to simply put your parameter in the Value field (do not use the JOIN function).
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c02370b5-aeda-47ec-a3a8-43b2ec1e6c26/reporting-services-multi-value-parameter

Passing multiple values using URL to a drop down parameter in SSRS

I am trying to pass multiple values for a parameter in ssrs which is delimited by ','.Limiting the result data set using where condition using split function in stored proc, this gives me results of my report data set
WHERE YEAR(a.month_start_date)IN (SELECT Value FROM dbo.FnSplit(#year,','))
--AND datename(month,month_start_date) IN (SELECT Value FROM dbo.FnSplit(#month,','))
AND b1.branch_cd IN (SELECT Value FROM dbo.FnSplit(#branch,','))
I created a data set to get available values for year filter
Configured the parameter to get available values from my filter data set and also checked option to "Allow multiple values"
Select distinct year(month_start_date) as Year
From [DB].[dbo].[table]
Then I also limited my report data set to accept parameters with following condition.I configured parameter to accept the following value
=Join(Parameters!year.Value,",")
I pass in values in url
http://<servername>/ReportServer/Pages/ReportViewer.aspx?<reportname>rs:Command=Render&year=2012,2013,2014
My filter does not select the values passed thru the url. The report only shows me the list of values in drop down but does not select the values parsed thru url
I am not sure if I am missing anything else. Please suggest.
Thanks!
The issue here is that your URL is constructed incorrectly. You are trying to pass througth the years as a single parameter and that isn't how it works. Pass it through as a whole heap of parameters and then let the reporting server put it together and put it into the SQL.
Your URL should look like this (I changed the : to %3a and broke up the year parameter)
http://<servername>/ReportServer/Pages/ReportViewer.aspx?<reportname>rs%3aCommand=Render&year=2012&year=2013&year=2014
I hope this helps someone out.

SSRS multivalue parameter passing

I have a multi value parameter I get from a query. I pass it to my dataset and it works like a champ. The dataset parameter uses join, i.e., =JOIN(Parameters!CodeList.Value,",").
So far so good. However when I pass this to a subreport, the subreport seems to only "get" the first item in the list instead of the string.
Also, if I put a textbox on my main report that looks at the CodeList parameter, i.e., =Parameters!CodeList.Value(0), I just see the first item. Using JOIN here returns an error.
I clearly don't get something here. Any available illumination?:)
How about this ?
=Parameters!CodeList.Value(0) gives you the first selected parameter value
=Parameters!CodeList.Value(1) gives you the second selected parameter value
so on
&
Join(Parameters!CodeList.Value,",")
will give you the all selected value for the parameter seperated by ,
Condition is, parameter should exists lol'z.
Assuming that you want it to behave identically to your dataset in this report (I.E. you want to send a string containing all the values in your parameter separated by a comma), you just need to pass the same thing to the SubReport's parameter:
=JOIN(Parameters!CodeList.Value,",")
If what you actually want is for the Parameter in your SubReport to have the same values as the Parameter in your main report, you need to pass:
=Parameters!CodeList.Value
Note the absence of the (0) at the end. The (0) on the end of it will cause it to pass only the first value in the parameter which isn't what you're after.

ssrs get single value from dataset into parameter default value

I'm using SSRS 2008R2 and i try to get single value from dataset to use it as default value of report's parameter.
Dataset filled with this query:
select distinct
o.organization_id,
o.mean_name,
o.short_name
from
dbo.organization o
inner join
dbo.identifier i on i.organization_id = o.organization_id and
i.market <> 3
I have report's parameter organization_id, whose value user selects. And now I want get value of field short_name from dataset where field organization_id equal to parameter organization_id. But I can't do this.
I tried to use Lookup function like this:
=Lookup(Fields!organization_id.Value, Parameters!organization_id.Value, Fields!short_name.Value, "dsOrganizations"), but server gave me error "Fields cannot be used in report parameter expressions".
I tried to make variable with this Lookup function, but variables can't be used in report parameters.
And now I have no idea how set parameter default value from dataset.
I will welcome any tips or suggestions.
I create one more dataset with this query: select short_name from organization where organization_id = #organization_id and set parameter value equals to parameter organization_id. After there I set default value to parameter short_name just as "Get values from a query" and as dataset set new dataset.
I hope, that my experience will be useful to someone.