Hi currently i am doing a SSRS Report & i wanna make a drillthrough action
may i know how to make drillthrough depends on rows?
i had try like this & still not working
=SWITCH(ROWNUMBER("ReportDetails")=1 ,"Jan"
ROWNUMBER("ReportDetails")=2 ,"Feb")
my desired output
1 main table & 1 sub table
like if i clicked on the feb's amt then will drillthrough to the feb's details, if i click on jan's amt then will drillthrough to Jan's details
The basic process is as follows.
Create a new report that accepts 'Month' as a parameter.
The dataset should filter based on your parameter so it may look something like this...
SELECT * FROM myDetailTable WHERE Month = #Month
Test this is working by manully setting the parameter and once you are happy with it, go back to your main report.
In the main report, right-click the cell that you want the user to click on to drill into your new report. This could be any textbox in the row, for exmaple the 'Amt' column. When you right-click, choose "textbox properties" then click on the "Action".
In the Action dialog, select "Go to Report", select your new subreport (the one we created above) in the "Specify a report" drop-down.
In the paramaters list, add a new parameter,
In the "Name" column 'Month'
In the value column, select the name of the dataset column that contains your month, for example [Month]
That's pretty much all there is to it.
Related
I am working on SSRS 2005 and creating report, The report has two parameter one is date and other is Department. Department parameter may be null.There is also image(button) Graphical View.
Now condition is....
When I pass only date and click on the button then
"AllDepartmentReport" Should open.
When I pass date and department then only "DepartmentWiseReport" should open.
Create an expression for the action of your image.
Something like:
=IIF(
ISNOTHING(Parameters!Department.Value),
"AllDepartmentReport",
"DepartmentWiseReport"
)
I am struggling with adding a Subreport to my main report.
I have a main report we will call Supplier, which takes 2 parameters DateFrom & DateTo; this brings me back a list of suppliers with these columns AccountID, Account, Name.
Even though AccountID is returned in the initial dataset its not displayed in the report - what I want to do is be able to click on the Account field and get to a subreport of performance
This report needs 3 parameters - the AccountID, DateFrom and DateTo parameters from the initial dataset
I cant seem to add the subreport though, can anyone help?
First, create the SubReport as required as a separate RDL file.
Next, in the main Report, add a SubReport placeholder as required - based on your description this will be to a table that lists your Accounts:
Go to the SubReport properties and link the placeholder to the SubReport you've already created:
Finally, link the Parameters from the main Report to the SubReport:
You can see that AccountID will take the field in the table row, and DateFrom and DateTo will have the main Report parameters passed through.
This should be all linked up and ready to go.
I did the following in MS Access: I made a form which had a combo box and a button. You select an option from there and click on the button and it is supposed to open a report. Now, I wrote a query selecting a few fields from a table and in the where clause, gave the condition as where name=str(combo1.value) and the report source was specified as this query. Now, when I select the value and click on the button, it opens a blank report. How can I make it load only those particular values?
I am not saving the combo box value anywhere. It said that it would remember the value for later use. Am I doing the right thing by not saving it? What should I do to make this work? Please help me!
Edit: The combo box is using values from a column 1 in a table X. I've not bound the value to any field and am using the "Remember the value for later use" option provided. The combo box is essentially a list of hotels and the report is a list of people staying at the selected hotel. When I put the ID of the field (as defined in the X), it works. But the thing is, it should refer to the names of the hotels and not the ID, which I am supposed to enter in a popup that asks for it. What do I do?
Edit 2: The query is as follows:
SELECT Table_1.Hotel_Name, Table_2.Name_of_Delegate, Table_2.Address, Table_2.City, Table_2.Center, Table_2.Spouse_Present, Table_2.No_of_Children, Table_2.No_of_Guests, Table_2.No_of_Rooms
FROM Table_1 INNER JOIN Table_2 ON Table_1.ID=Table_2.Hotel_of_Residence
WHERE Table_1.Hotel_Name=FormName.Combo7.Text;
When I click on the button (which opens the report), it asks for the name of the hotel in a popup box. How can I avoid this? What I am doing wrong?
You can use a WhereCondition with the DoCmd.OpenReport Method as a "dynamic WHERE clause" for your report's record source. Use something like this in the click event of the command button which opens your report.
DoCmd.OpenReport "YourReport", , , "[name]=" & Me.combo1
Remove the WHERE clause you added, where name=str(combo1.value), from the report's query.
I surrounded name with square brackets because name is a reserved word. See Problem names and reserved words in Access
Edit: In a comment, you said this about the combo box:
"Row Source is SELECT [Table_Name].[ID], [Table_Name].[Name] FROM [Table_Name];. Bound Column is 1 (which I assume shows the names I wish to be displayed in the combobox.)"
When you refer to the value of a combo box, that value is the value of the "Bound Column". So in your case, the bound column is 1, which means the combo value will be [Table_Name].[ID]. However, you want to open your report based on the [Name] column of the combo. So change the bound column of the combo from 1 to 2.
To open a report using the value of your combobox, in your report query you need to do the following:
SELECT fields
FROM table
WHERE YourValue = [Form]![FormName]![ComboBox Value]
You have to specify the name of the Form, plus the value so the report query knows the value. Hope this helps.
I have a drill through link on the value cell of a matrix to show a detailed report. However when I run the report, users are able to drill through using the sub total of this value. How do I disable the click through navigation for the subtotal only.
Using the “Jump to report” expression (on the Navigation tab, in properties of the cell), return False when in the subtotal.
For example assume one row group and one column group called matrix1_Row1 and matrix1_Col1 respectively and “ReportName” is the name of the report we want to drill to.
Use the inscope function to check that you are not in a subtotal. i.e if both Row1 and Col1 are inscope then this cant be a subtotal.
=iif(inscope("matrix1_Row1") AND inscope("matrix1_Col1"),"ReportName",false)
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