Passing distinct Multiple Parameters in SSRS - reporting-services

I'm in a peculiar situation here. I have a report which takes #ProjectID as a parameter and shows all the info related to that project.
Now I have to pass multiple project ids separately as parameters to the report and each report(ProjectID) should show in a distinct page.
I did research on Multivalues parameters but could not find a way to accomplish this. Any advice is much appreciated.

Create the #ProjectId parameter as multivalue
In your SQL query use the multivalue parameter using IN eg. WHERE ProjectId IN (#ProjectId)
Add a table group, grouping on ProjectId field. In the group settings enable "Page break at end"

Related

Create a Report Based On a Parameter Query

I have an Access application that has been running for years now. It's a payroll system. There's a query (let's call it Query3) that pulls data from 2 crosstab queries. Everything worked fine until when I introduced a parameter in the crosstab queries. The parameter refers to a date on a form. Now I can't create a report with Query3 as its record source. When I use Report Wizard and I select Query3 as its record source the field names are not displayed. I have a sub that programmatically creates a report based on Query3 but now with the parameter this fails too. I'm really stumped. Is there any workaround? Thanks in advance for your help.
Are you using the Forms!MyForms!MyControl syntax as the parameter in the Crosstab subs? The problem seems to be related to Access not finding the control .
One thing I have done in the past is, if possible, is to remove the crosstab parameters and instead set the SQL of the crosstabs before running the report. So for example:
CurrentDB.QueryDefs("CrossTabSubName").SQL - "SELECT * FROM TABLE WHERE MyParam = 'A'"
If you have a button or something that launches the report, this may be an convenient place to do this. If the parameter is on the same form (i.e. a report filter), then this approach is simple to implement. In this example, the value of 'A' is a control on the form that allows th user to filter the report.

How to select values for parameters in SSRS based on a previous parameter's selection?

I have a SSRS report that I am creating that has 4 dataset parameters:
#PullBy
#Employee
#FromDate
#ToDate
All Data Sources and Datasets have been associated with the report and the basic functionality of the report has been setup and tested.
How the parameters work is the #PullBy has 5 options:
Employee
Supervisor
Manager
VP
Admin
When 1-4 is selected you get a dynamic list generated for the next parameter #Employee.
The user then can (multi) select names from the second list and then set the To and From Dates to generate the report.
This is all working. I have been tasked to add the Admin option to the first parameter and its function when selected is to do the following:
Select All the Employees for the second paramter
Autofill the To and From Dates based on the current month
Is it possible to associate an Expression in SSRS for that parameter value that will then populate the desired selections in the parameters that follow?
I have searched for an answer to this and maybe it is how I am phrasing the question but I have found no answers thus far. Any help is appreciated.
The phrase to search for would be "SSRS cascading parameters". Yes, it's possible to reference previous parameters in the datasets for subsequent parameter values. If you run into a specific issue once you've tried it, post a new question with as many details as possible and we'll take a look.

How to group parameter values in SSRS

I currently have a few parameters set up in my SSRS report, but one is kinda giving me a bit of a headache.
I currently have a parameter called PARAM_ONE which is populated by a Dataset that I have. The value is populated the Id field of my Dataset and the label is the TextValue field of my Dataset.
I have another parameter called PARAM_TWO which is populated by a Dataset that is filtered based off of what is selected from PARAM_ONE. Again the Parameter value is populated by the Id field of this Dataset and the label is the TextValue.
My issue is that this Parameter shows duplicate fields because of the way that the data is set up. There are multiple values that go to the corresponding data I am trying to display. I would like to set it up to group all of my PARAM_TWO data that way duplicates are not showing, but I still need that first dataset relationship to map the data.
I hope this makes sense, and someone can help. If I am not making sense and need to clear anything up I would be more than happy to, just let me know.
I was able to figure out the solution to my issue thanks to the help of #user3340627.
In my dataset I created a query that looked something like this:
SELECT DISTINCT Id, TextValue FROM MyTable
WHERE SecondId = #PARAM_One
This created a parameter in the Parameters tab called #PARAM_ONE. I was then able to map my report parameter to the query parameter and run it with no issues.

SSRS reports from multiple queries

I am trying work on a requirement using SSRS 2008 R2. The requirement is to create a detailed report which has main query(dataset1). And a column in this main query is used as a join or input to another query(dataset2).
I am trying to create a parameter and get the value for this from the main query or dataset1. How do I assign this parameter to dataset2? Also I will have similar situation to create dataset3, dataset4 etc and all this sub queries needs to be joined to dataset1.
Can you please help me what is the best way to do this?
In Dataset2, use a SQL variable in your query. SSRS will create a report parameter for you. Then go into this new report parameter and tell it that its available values should come from Dataset1.
Then repeat for the other datasets. :)

How to pass parameters to report model in Reporting Services

I'm developing report in RS that show top N customers based on some criteria. It also allows to select number of customers and period of time.
Is it possible to do it by using report model? Thing that it seems to be difficult is how to pass parameters determined by user.
Another thing that in my oppinion is very disappointing is that i cannot use SQL query as dataset query, because it uses odd and elaborate XML. Although report model items seem to map its fields to query or table fields.
I m concerning using report models because i need to provide uniform data model (the same tables and fields) for more or less different database schemas.
It would be very nice if somebody would explain what can be done with report models and what can not.
Maybe what you're looking for is to use the result of a Stored Procedure as the data source for your report. You would need to define parameters at a Dataset level to pass to the SP
You can create report model based paramaterized filters through the query designer by adding a filter, drag the field you want to filter on into the filter area, then right click on it and select "Prompt". This will automatically create a report parameter which you can then edit via the parameter properties dialog to set the data type, allow multiple values, etc.