Multi value parameter in SSRS 2008 - reporting-services

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.

Related

SSRS Create As Many Tables As Needed (Using One Dataset) Based on a DataSet Field

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!

SSRS Hidden parameter results in "Parameter X is missing a value"

First I would like to apologise for any mistake and misuse of the english language as it is not my natural language.
I built a few reports using SSRS. Each one are feeded through different stored procedures.
Each stored procedures has two parameters: id and date. When I display the report the parameter I only want to be visible the date that will be supplied by the user. The id should be hidden and with the default value of 1. So, I turned the parameter id to hidden and set up a default value with the value 1. Im setting the default value on a report's definition level instead on the datasets used to feed the reports. PLease see below the steps I have done:
enter image description here
enter image description here
I've been through some websites(stackoverflow included) and I've seen similar issues. I followed the suggested tips but still no success.
Any help on this will be very appreciated.
Thanks
P.S. Im using VS2015 to design the reports and SQl Server 2014.
Without knowing more, my first instinct suggests that you have your parameters ordered incorrectly. If you have a parameter, P2, with a default value that is processed after a parameter without a default value, P1, and both parameters are hidden, then the report will fail citing that P1 is missing a value.
See my screenshot below as an example. You need to make sure that the parameters are loaded in the order, vertically, that they should be processed, especially if one parameter is dependent on another. Take a look at the ordering and leave a comment if you need further information.
Revised based on Response in Commments
Try opening the report manager via the Report Server web interface (http://[serverName]/[instanceName - reports is default]/Pages/Folder.aspx?ItemPath=/[directoryOfReport]). Click on the dropdown list beside the report name and choose manage. Check out the parameters tab and make sure the default is set properly. Sometimes, if you've messed with parameter properties numerous times in BIDS or report builder, the settings won't translate onto the server itself. Let me know if that fixes it.

MS Access: Passing Parameter to Subreport w/o SQL

I'm trying to find a way to pass a parameter from a report to a subreport without resorting to any SQL code or macros (my officemates are non-technical, but still have to use the Access database to run reports, occasionally making tweaks to them.)
I'm working in Microsoft Access 2013. I have a table that contains a list of investments as well as which state those investments are based in. I have a query that pulls data on Investments based on a user-entered State parameter. I then run two reports: one that simply lists the investments grouped on different categories, then a second report that summarizes the investment categories into a table. I've put the summary report at the top of the detailed report as a subreport, but I want to pass the State parameter through from the main report to the subreport so the user doesn't have to enter it twice. Is that possible without resorting to writing any SQL code or macros?
Thanks!
I think I understand what you're trying to do, but please add details if my answer doesn't make sense.
You can pass user entered information by referencing by
[DatabaseObjectType]![ObjectName]![FieldName].
If the user is entering the State value from a Form, you'd reference:
[Forms]![FormName]![State]
where FormName is the name of your form, and State is actually the name of the Form control containing the State value.
If the user is entering the State value in a prompt from a query, you'd reference:
[Queries]![Query1]![State]
where Query1 is the name of your initial query that gets the state info from the user, and 'State' is the name of that field.
You put these references in to your secondary query or report:
for example, in a second query, you can set the State field Criteria (in query design view) to be = [Queries]![Query1]![State]
so the second query will pull the State value from the first query
on a report, similar idea - you can set the Control Source of the State control (in Properties) to be = [Queries]![Query1]![State]

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.

How to use parameters in report when using SSRS matrix and table wizard

I would like my users to be able to create their own quick and easy reports from a cube on the fly, and that is most simply done using the "Table or Matrix Wizard" in Report Builder.
However they need to filter by date--and it wont work.
I have tried:
1) Creating a dataset with parameters imbedded. When you run the report, it asks for a parameter but there are no values in the drop down -- and an analysis of the "Parameter Properties" shows no available values. (Even though I chose values when creating the dataset)
2)Creating two datasets, one with all the data and one with only the date field. However the matrix wizard will not allow you to use 2 datasets.
Is there any simple way to add a filter to the report so that my users can just load a dataset/two and then use the Matrix wizard?
Thank you!
If the user running the report needs to define a date parameter, they need to create a date parameter with the same name as the parameter in the stored procedure that is called by the report. They should then set the Data Type to Date/Time, and make sure the parameter is visible.
When the user runs the report, they will be able to use the calendar feature to pass the date value to the report procedure.