3rd party application passing url parameters to SSRS report - reporting-services

The 3rd party application is passing the parameter values as follows: Parameters=Collapsed&Priority=P1%7cP2. It is using a %7c (which is a pipe) instead of passing the parameters the way SSRS is looking for them as follows: Parameters=Collapsed&Priority=P1&Priority=P2. The parameter is multi select in SSRS and works in Report Builder just fine. My where clause is using IN (#priority).
How can I get SSRS to use the parameter values that are being passed in the URL?

If you can't change the application to provide the correct multi-value parameter syntax (...&Priority=Value1&Priority=Value2&Priority=Value3...) you can set the value that is passed to your dataset in the Parameters section of the dataset properties to be the following expression:
=split(Parameters!Priority.Value,"|")
This will take the pipe delimited list and separate it into a list of items that can be passed to your SQL query and used with the IN function.
I have created a dummy report to demonstrate this:
Parameter
Dataset
Dataset Properties
Report Result

Related

Issues with Passing Multi-value Parameters to a Drill through Report

I have two reports were I pass multi-valued parameters to it's underlining data and both reports work very well independently. The parameter strings are being split using the function dbo.UTILfn_Split. When trying to drill from the main or Summary report into the sub or Detailed report all other parameters field in the report are populated except the multivalued parameter field. The parameter lists or value are listed in the detailed report but not selected and therefore cannot run the report even though the detailed report parameter property is set to allow multiple values. In both reports, the where clause is set "IN" not "=." How do I fix this?
In your Summary Report, when you pass the parameter to the sub or detailled report, the passed value parameter should be like this expression:
=join(parameters!yourMultivaluedParameter.Value,",")
after that, you pass the name of the parameter to the corresponding parameter in the dataset Detailled report.
In your SQL (SP), get the multivalues of the parameter by spliting it with your function
like following, depending of the result of your function, for exemple:
INNER JOIN dbo.SplitFunction( #yourMultivaluedParameter,',') tmp on tmp.yourColumn = ...etc...
Hope it helps...

How to pass variables as parameters to subreports using SSRS

I am working on an SSRS project which has main report and sub reports. To the subreport, I would like to pass a variable that uses stuff sql syntax. This variable will have comma separated values. I would like to know how to pass variables as parameters to subreports.
If you go to the Action tab in the properties window, there is an area at the bottom which you can assign the parameters to be passed to the next report. If you want to pass an existing parameter, you would send
=Parameters!MyParameterName.Value
as the value.
I'm not sure what "stuff sql syntax" means, but you can pretty much put whatever you want into the value field as a string and parse it in the next report.

Unable to add SSRS Parameters/Filters

I have created a ssrs report which requires a drop down filter to select values.
The steps I have taken in report:
Created the Dataset
SELECT * FROM Voluntary_CCC_Split
Then applied where statement in dataset - where [WORK ORDER OPERATIONS TYPE] in (#WorkOrderOperationType)
The parameters now appears but when changing to available values and selecting dataset, value field and label field i get error below when generating report:
the report parameter has a default value or a valid value that depends on the report parameter. forward dependencies are not valid
I only have one parameter
Your parameter was configured to have its available values populated from a dataset that referenced the same parameter. Instead of this circular reference, create an additional dataset that simply returns the labels and values for the data you need, and use that to populate your parameters available values.

ssrs - Forward pointing dependencies are not valid

In an existing SSRS 2008 r2, report, I am attempting to add a parameter called 'Customer_Category'. I am getting the following error message:
The report paramter 'CustomerNumber' has a DefaultValue or a ValidVaue that depends on the report parameter 'Customer_Category'. Forward pointing dependencies are not valid.
I am trying to determine how to fix this error. The 'CustomerNumber' is a parameter value that is obtained by reading from a dataset. In this dataset there are existing other parameters called 'Customer_Type' and 'Customer_Preference'. Both of these parameters obtain there values from selections that the user makes when the SSRS report is executing. There are no default values.
I am trying to have the 'Customer_Category' be the same way where there are no default values and the user must select the parameter value when the report is executing. There should only be one value that the user can select from.
The new parameter called 'Customer_Category' is the last parameter in the list of parameters. Does the order of parameters make a difference? If so, how can I move the 'Customer_Category' parameter in front of the customer_number parameter?
Here is the sql that is used from obtaining a list of customers from the dataset for customer_number:-
SELECT Distinct CustomerNumber
FROM BridgeUserCustomer
WHERE
Type = #Customer_Type
AND Preference = #Customer_Preference
AND Category = #Customer_Category
GROUP BY CustomerNumber
Would you tell me what is wrong and what I can do to solve the problem?
Summary
The order of parameters in your IDE (Report Designer or Report Builder) matters.
If you have a hierarchy of parameters (one level dependent on the other), the top-level parameter must appear first in the parameter list.
In SSRS these are referred to as cascading parameters.
Solution
Open the Report Data tab
Expand the Parameters folder
Select a parameter and use the up/down arrows to adjust order
Report Designer
Report Builder

How to pass multiple values to my SSRS Report from MDX

I need to pass multiple values to my parameter in ssrs report from MDX.
My Dimention :
[Dimenction].[Heirarchey].[Month].&[09]&[2012] this is internal parameter.
I need to pass multiple month names and single year to my parameter and then my parameter is going to populate the data from my dataset.
A possible link:
http://social.msdn.microsoft.com/Forums/en-NZ/sqlreportingservices/thread/7f9cc219-1a57-4ddb-8bd5-5135e0aacbe6