Optional multi Select parameter Selection - SSRS reports - reporting-services

I have a SSRS report with multi select parameter option. I'm able to either select few or all. But in my scenario the parameter section itself is optional. If nothing is selected no data should come based on the parameter.
Is there a way to do that in SSRS?

Related

How to set an optional parameter of date/time ssrs parameter along with specifying dataset query of available values in it

I am facing a problem with ssrs report. I want to set an optional parameter of date/time parameter. But besides I want to specify available values to be redirected to other dataset query. Is there any possible way to do it.

Display selected values of multi-value parameter in tablix rows

I am designing a report for SSRS. I want the user requesting the report to be able to specify, when they generate the report, from a pre-defined selection some values which should be displayed in a tablix on the report.
I have therefore created a multi-value parameter and populated the Available Values with the options I want the user to be able to select from, and, as expected, when the report is generated the user is able to select one or more of these values.
However, what I now want to do is include a tablix in the report, and display a row for every value in the multi-value parameter that the user selected, with the value displayed in the first cell of the row.
If the values were coming from a data table this would obviously be easy. I've also found answers on how to show all of the selected parameter values in a single textbox using the JOIN function, but I don't want to do that.
The only solution I can think of is to replicate the list of available values in the multi-value parameter in a tablix manually, and link the visibility of each row of the tablix to the selected state of the corresponding value in the multi-value parameter, but that's not very elegant and increases the effort involved in maintaining the report definition.
Any ideas on how to do this? I know the selected values from the parameter simply form an array, but I can't see how to bind a tablix to any data that isn't in a dataset, or how to create a dataset from the parameter values.
Considering that a tablix sources from a dataset, I did some experiments to see how to create a low maintenance solution for you.
Option 1: Create a data set with hard-coded options to match your multi-value parameter and select those options WHERE they exist in the parameter.
Example:
SELECT val
FROM (
SELECT 'opt1' as val
UNION SELECT 'opt2'
UNION SELECT 'opt3'
UNION SELECT 'opt4') a
WHERE val IN (#Param)
Thoughts: easier to maintain than visibility on a table, but still two hard-coded places within the report.
Option 2: Create a dataset that selects the multi-value parameter and splits it by each value. This was my first idea, but I ran into some issues with determining how to actually select the multi-value without a syntax error. I came up with a method that creates a deliminated string in the report and than parsed that string back into rows in the dataset:
Step 1) Within the dataset properties, on the parameter tab, join the multiple values together with a JOIN expression
Step 2) Create a simple query which uses the new SQL Server 2016 function string_split. Note that your database compatibility level MUST be 130 or higher to use this function (SQL 2016+). If this isn't your scenario, there are many string split functions that you can find on Stack Overflow to achieve the same thing.
Fun problem!

Is there any way to hide SSRS report paramteres using expressions?

I have created one report in SSRS-2012. I need to show/hide(not inactive) one parameter based on one formula. Is it possible. I am using Visual studio 2010 for my front-end development and report viewer control for showing the report.
Help me please
Currently there is no way to dinamically hide parameters in SSRS. Depending on your requeriments you may have two ways to handle this issue.
Create one subreport for all parameters and another subreport that does not include the parameter you want to hide, then show dinamically the subreport to the user based on your expression.
Other option is have another parameter set as internal. And conditionally populate that parameter based on your expression. If your condition yields true, populate the parameter with the user selection, otherwise use a default value or populate it to null. At presentation level your parameter keeps appearing but the user selection will take effect only based on your expression.
I think the second option is easier, let me know if you need further help.

ssrs multivalued parameter that selects which reports to execute

In an SSRS 2008 report, I would like to be able to allow the user the option of selecting between 1 to 30 different ssrs reports that they would like to run as a parameter value. Basically when the main report starts to run, I would like to allow the user the option to pick which report(s) they would like to run as a multivalued parameter. This would be different than a user clicking on a link that would call a subreport or click on a link that would call a different report.
Can you tell me if the above option is possible in SSRS 2008? If so, can you tell me how to accomplish this goal? If this is not possible, can you make any recommendations on other possible options on how users can select which report(s) will run and tell me how to set this up in SSRS 2008?
If this option is not available in ssrs 2008, is it an option in SSRTS 2012? If so, can you tell me how to make the multiple report selection option a possibility?
Here is one way to go about it.
1. Create a main report with you multi-value that has values A and B.
2. Create a sub report that contains Report A and B as sub reports with a parameter that accepts multi-value.
3. Perform rendering logic created in step 2.
Whether you decide to use sub-reports or a group of tables you can display or hide them by adding an IIF expression in each tablix's (or subreport's) visibility properties.
=IIF(Parameter!ReportOption.Value=1, FALSE, TRUE)
...where ReportOption is the parameter your user clicks on to choose which report they want to see. Add this parameter by going to the Report Parameter Properties and entering your list of reports (via Available Values).
Example
Label: Report XYZ | Value: 1
Label: Report ABC | Value: 2
Side note: If you decide to add a table for each report you'll need to add its respective datasets/datasources.
Hope this helps.

setting default values for a multiselect parameter in ssrs

I have a report with a parameter which allows multiple selecttions. Now what ssrs has done is that it has added a "select all " option in the parameter drop down. What I need is that if the user does not select anything all should be selected. That is I want all as default value. Please help.
thanks
Using SSRS 2008, you have a couple of options. If your parameter is populated from a dataset/query, then you should be able to choose Get Values From A Query in the Default Values tab of the Parameter. If you select the dataset that your lookup is being populated from, and the ID column, all values will be selected when you run the report.
If your parameter is populated via a list you have entered, then choose Specify Values in Parameter Properties and Add all the Labels/Values in your list.
I'm not sure if this is the same for SSRS 2005.