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

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

Related

How to filter a tablix based on paramater but no filter when paramater is null?

I've a tablix with data that comes from a dataset , there is a column called Productgroup and there might be some users that would like to apply a filter on it.
I'm trying to build an ssrs expression that will filter my tablix on that specific column but only when the parameter called #Filter is not null , if null , it does not need to apply filter
I've tried
Expression: Productgroup
Operator: like
Value: =IIF(IsNothing(Parameters!Filter.Value), false, Fields!ProductGroup=Parameters!Filter.Value)
Nothing seems to works :(
First of all, it's best to send your parameters to your dataset and filter on the server, rather than bring back ALL of the data and filter on the client side. So that means parameterizing your stored procedure, or using a WHERE clause to filter the table/view you're connecting to.
If you stick with this approach:
You want your Expression to be "ProductGroup".
You want your Operator to be "=".
You want your Value to be =IIF(IsNothing(Parameters!paramFilter.Value), Fields!Productgroup.Value, Parameters!paramFilter.Value)
What you're doing is saying if the parameter is empty, I need the ProductGroup to be equal to the ProductGroup. That's always true. But if the parameter is not empty, the ProductGroup has to be equal to the parameter value.

Passing a report variable to another expression

I'm trying to pass a report variable to an expression used to populate textbox but it's giving me syntax error. Here's the expression.
=Fields!Variables!col1.Value.Value
The variable (Variables!col1.Value) should return a fieldname that I want to use to populate a textbox inside a table.
Edit:
Basically I have a multi-value parameter that passes on to a stored procedure that pulls the data based on the parameter value. The first 4-5 columns returned are static while the rest are dynamic and can have unknown number of columns but I do know the max number of columns.
What I'm trying to do is to create a fixed number of columns and then show/hide them based on the parameter. I get the column title via an expression (=Parameters!Course_IDs.Label(0)) and then I want to use this value to create a textbox that will populate the column based on this value Course_IDs.Label(0).
Since it is a multi-valued parameter, you will likely need to join the results:
=JOIN(Parameters!ParameterName.Value, ", ")
If it is a variable from the dataset you will likely need to use LOOKUPSET() to get the values.
Also note that parameter values might be ugly to look at. In that case use the name instead - Parameters!ParameterName.Label

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.

SSRS expression with missing column not working

I'm trying to create an expression with a missing column. as in the column is not returned from the query but does exist in the list of fields.
The problem I'm having is that every time I do an expression and one of the parameters is from a field that doesn't have a return from query the query fails silently. the following example is looking at a field "test" that, as I said, exists in the list of fields but is not returned from the query, how can I have this is statement send "alert"??
=IIF(Fields!test.IsMissing,"alert",Fields!test.Value)
The reason that I don't return the field is that the columns are dependent on the parameters I enter in the procedure (so they could be used or not depending on what the user is asking)
Thank you
From reading your question I think, you have dynamic columns which will be returns conditionally
So what you should do is,
1) Create the parameter in the parameter list and set it as the internal and assign the field value to that parameter, suppose the parameter is dyanmicfiledvalue
2) Change your expression as,
=IIF(IsNothing(Parameters!dyanmicfiledvalue.value),"alert", Parameters!dyanmicfiledvalue.value )
that should do it. Let me know in case of issues.
Or if you want to check null or empty value for that column just change as
=IIF(IsNothing(Fields!test.value),"alert",Fields!test.value)

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.