How to use query string parameters in SSRS Report 2012? - reporting-services

I'm using BIDS Helper in a tabular project and I used a functionality to go from a Excel pivottable to a report with complete list of BI metrics. I already constructed the link as
http://reports.ABCDEFJ.net/ReportsDW/Pages/Report.aspx?ItemPath=%2fABCD+BI+Reports%2fDEV%2fDicion%c3%a1rio+de+Dados%2fR07+Dicionario+Dados&PRM_CUBE=01_CUBE_STOCK&rs:Command=Render
the link has a PRM_CUBE parameter with a cube to filter. My SSRS report already has a parameter PRM_CUBE with a combo box.
What do I need to do to link the PRM_CUBE parameter to the SSRS parameter/combox? The objective is naturally to:
nothing selected on combo, nothing appears
A is selected in the combo or sent via link, show it on combo and list associated values
B is selected in the combo or sent via link, show it on combo and list associated values
At this moment the report completely ignores the query string parameter.

Related

SSRS 2012 Parameter settings

I am creating a report with columns say A,B,C,D,E. I am setting up a drill down on the column A that fetches one more report with Columns
G,H,I,J. The values for the columns G,H,I are from taken the columns A B C. For the column J,I need to pass a parameter explicitly(not from the source report). I set that parameter in
the properties section -> Available Values and mentioned the values. I ran the main report and get the following error
The Parameter J is a missing value
I am pretty much new to the SSRS projects and would be great if I could any assistance on this
It sounds like you are putting parameter J in the wrong place. It doesn't go in the Parameters collection for the main report but in the parameters that are passed to the sub-report.
Right-click the cell with the drill-down and select Text Box Properties.... Choose Action from the left-hand menu and it will show the drill-down report. Under this it says Use these parameters to run the report:
Add the parameters of the sub-report and the values you are passing. You can use an expression to provide the value for parameter J.

Switching an SSRS Report Based on Parameter(s) Selected

I have two reports that are more or less very different from each other and yet have the same parameter list. The requirement is that these report should be in the same solution and users should be able to switch from one report to the other base on the condition of the Boolean parameter selected. Now I have an expression written but where it should go in the report body is where I don't know.
My expression:
=Switch(Parameters!Tax.Value = True,"Tax Todate Summary",Parameters!Tax.Value = False,"Line of Action(s)")
I would build a "Navigation Report". This would have the same parameter list, including that Boolean parameter.
The body of the report would contain two Subreport objects, for the two actual reports. I would lay these out one above the other. They would be the only objects on the Design pane of this report.
I would set the Visibility property of each Subreport object based on the Boolean parameter. I would pass all the other parameter values through to each Subreport.

Access 2010 - Report asks to enter parameter value

I have a report with a subreport. Report is unbound (it is used as a template for letter and contains plain text only). Values in the subreport are based on values of two combo boxes located in a form.
So the logic is as follows - when the form (frmForReport) is loaded the user selects values in combo boxes intended to filter the database (cboSelectCompany and cboSelectPU), then clicks OK button which opens my report with its subreport. Subreport is populated from a query where two of fields have those combo boxes as criteria. Everything works fine (I select what I need in combo boxes, report opens in Report View with the subreport showing all filtered records without any warnings or requests) until I want to switch to Print Preview or Create PDF. Every time when I do so I see pop-up window Enter Parameter Value with a reference to one of criteria used in the subreport. When I close this window I can proceed further, save it as pdf or switch to Report View but the subreport appears blank, literary disappears.
This is for Access 2010. Below is the query used as a record source for the subreport:
SELECT qryForLetter.CrossingID, qryForLetter.DispID, qryForLetter.AgreType, qryForLetter.Legal
FROM qryForLetter
WHERE (((qryForLetter.Company)=[Forms]![frmForReport]![cboSelectCompany]) AND ((qryForLetter.PU)=[Forms]![frmForReport]![cboSelectPU]));
What do I miss? How do I get rid of this pop-up window? Any help is greatly appreciated.
You could try replacing parameters [Forms]![frmForReport]![cboSelectCompany]) and [Forms]![frmForReport]![cboSelectPU] with functions.
Create global variables in the header of a module:
Public Company As ...
Public PU As ...
... replacing the ellipses ... with the correct datatype.
In your Combo Boxes' AfterUpdate events, assign the value associated with the Combo to the appropriate global variable, e.g.:
Company = cboSelectCompany
and
PU = cboSelectPU
and create functions (again replacing the ellipses ... with the correct datatype):
Public Function fnCompany() As ...
fnCompany = Company
End Function
Public Function fnPU() As ...
fnPU= PU
End Function
Then change the data source to:
SELECT qryForLetter.CrossingID, qryForLetter.DispID, qryForLetter.AgreType, qryForLetter.Legal
FROM qryForLetter
WHERE (((qryForLetter.Company)=fnCompany()) AND ((qryForLetter.PU)=fnPU()));
This has the effect of removing the dependence of the report from the form fields, which appears to be the issue.

SSRS Passing values between list and subreport

So this is like my third SSRS question and I've only been looking at it for a day :S
This question may be a little sketchy as I'm still not up with the terminology.
Basically I have a list that is bound to a "Select" of SiteId's. Inside this list I have a sub report. The idea is to pass these SiteId's into the sub report one at a time to generate a report for each site Id.
But I can't figure out the expression required to pass this value in?
Way off the mark? or is there an answer to this question
Look at the properties for the sub report (right click on the sub report and hit properties). In the properties dialog, there is a parameters tab where you can link parameters from the sub report to values from the parent report. So, if you have subreport with a SiteID parameter, you can link that to the SiteID value from the list.
http://msdn.microsoft.com/en-us/library/ms160348%28SQL.90%29.aspx

Reporting Services: How to place a report parameter in the header

I have two report parameters that were set up automatically when I created their associated datasets. They are ReportID and CompanyID. The user selects a Company Name from a list box and a Report Name from another list box. The standard SELECT ID, Name FROM TableName query was used to fill the respective list boxes. The report parameters work just fine and the report is displayed properly. My problem is this. I would like to place the selected Report Name and the Company Name in the report header (these are the Name values the user selected from the dropdown lists just before hitting the View Report button. I set up two new parameters, ReportName and CompanyName; marked them as hidden and set their default values to the appropriate datasets. The problem is that the header always shows the first name from the list, not the name the user selected. My question is, how do I place the selected information into the header?
I've had no problem doing this with the original set of parameters that are populated from a query.
In my reports I have a "Farm" parameter which is populated by a "SELECT FarmNumber, FarmName FROM Farms" query. The user selects the farm he wants from a ComboBox. I show the selected farm in the header of the report using this expression:
=Parameters!Farm.Label
"Label" is the "display text" (FarmName in this case) for the farm that the user selected.
Doesn't throwing in Parameters!ReportID.Value into a textbox in the header work?
From what it sounds like, you should use whatever the original Parameter is named in the 'ReportID' spot.
With SSRS 2008 R2, I had a header with multiple parameters:
My Export for [#ReportDate] [#AccountId.Label]
If CompanyID is a multi-value parameter, this will work:
=Join(Parameters!CompanyIDs.Label,System.Environment.NewLine)
=Parameters!Farm.value
replace value with Label
=Parameters!Farm.Label