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.
Related
I have a query that returns relevant data about inspectors and how long it takes them to respond to issues. The only parameters are a BeginDate and EndDate so for any given date range there could be anywhere from 0 to 100 inspectors.
I am using only one dataset and it contains an "Inspector" field that I'm hoping can be used as a filter to create as many tables as there are inspectors.
I know you can set filters on tables but from my (limited) SSRS knowledge, you must already have the tables created and the filters are typically hard-coded. What I need, is some way for the report to see how many Inspectors there are in the dataset and group those records into their own tables, repeating the same one created tablix over and over as needed.
This is being done strictly in SSRS 2012, not using a ReportViewer where back-end code could help me out unfortunately...
I don't have any code examples to provide, like I said I know you can do filtering but I am at a loss when it comes to doing something like this dynamically based on data... Sorry.
Depending on the report design you could either...
Single report with grouping
1. Create a single tablix.
2. Create a row group by Inspector and then add whatever fields you need to the details section.
3. You can optionally set page breaks between instances of your Inspector rowgroup from the rowgroup properties.
Sub report method
1. Create a subreport that accepts a parameter (InspectorID for example).
2. In the subreport filter the dataset using the parameter passed in so it only return data for a single inspector.
3. Add whatever controls you need to the report to handle a single Inspector
4. Create a main report
5. Add a dataset that gives you a simple distinct list of Inspectors, this will be used to pass parameters to the subreport.
Lets assume it just contains a list of InspectorIDs.
6. Add a list control to the report and set it's dataset property to the dataset that contains your list of InspectorIDs
7. Right-click in the list control's 'cell' and insert a subreport.
8. Set the subreport property to the subreport you created earlier and set that parmameter IsnpectorID to your InpsectorID field.
This will produce a subreport for each instance of inspector it finds.
Sorry about the format of this answer, in a rush!
I need to add a filter to a Report, that within anotherreport, the filtered results appear in the drilldown report.
For example: An .rdl file displays the first report, in that report a link can be clicked to access another report (.rdl) file. The report that displays after clicking link should be filtered by option selected from the first report(.rdl).
How could this be done? My thought that two datasets in each report could provide the information for the filter, however the filter expression is not valid this way...? I know this may not be the best way to do this.
So creating a drilldown report would be more acceptable. Creating one report and including a dataset with it by setting parameters to be called in the drilldown.
Does there need to be two datasets for each report to do this? I was assuming that the filter expression be written to do this: Field!.name.value AND Field!.name.value, etc to the whatever value I need to compare to or by.
Could this be a shared dataset to do this?
I was able to solve or partially solve this. I created a new report, with a query with the necessary columns that I needed in report 2. The drillthrough report(report 2) is linked from a textbox from a report allowing a user to view the information they need by clicking a link that displays the new report(passing the parameters from report 2 to the new report). If anyone has trouble with this, the simplest way would be to create one report and pass parameters to report two with parameters created from whatever query you want to use that has the values you want as columns in the report.
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.
How can you tell what value was selected first in a multi value parameter in SSRS 2008?
Example
a,b,c
are the values
and I would like to know if b was selected first and if so change the string to be b,a,c
If you mean tracking which value a user clicked on first in the web interface, then you can't get this functionality through SSRS. A multi-value parameter doesn't preserve this order.
A few workarounds come to mind:
Create multiple parameters
Create multiple parameters such as "Primary BU" and "Secondary BUs." You could even remove items selected as primary from the secondary list.
Create your own interface
You can always create your own "Report Manager" interface and then call reports and serve them yourself. You get complete flexibility over the UI, but still get SSRS to handle data, report creation, and export formats.
Javascript hacking
The SSRS webpage is a webpage after all. In theory, you can insert your own code. I wouldn't recommend this, as updates may break your code though.
Group,
We built a data cube using SSAS and are now building SSRS reports off of that cube. Not sure if anyone has come across this, but when you build the report using the wizard and include parameters all looks fine. However if you are in the report after the wizard is compete, and you decide you want to remove one of the parameters you created it debunks the report and the only way to get it back is to re-create the whole report.
Any way you can remove or add parameters after the initial build without destroying your report?
Thanks in advance for the help! I love this forumn!
I had the same problem and this is how I solved it:
Go to the data report tab.
Expand the Parameter button, Here you get a list of parameters.
Delete the unwanted ones.
If you look at the hidden datasets created for each parameter, each one has a query which depends on some of the other parameters, in a cascading fashion. Unless you delete the very last parameter, the other parameters won't work.
You can fix this by manually editing the parameter dataset queries can updating them not to use the parameter you want to delete.
The main query also uses the parameters in a nested FROM (... (... (... fashion. You need to update that so that it doesn't constrain itself to that parameter. Then there is a parameters button on top of the query builder which allows you to remove the reference to that parameter in the query.
I think if you remove the parameters from the wizard, it should update all the other parameters and the query to work correctly. This is probably the easiest route. All of your report objects should remain functional.