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?
+3
A:
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.
Dano
2008-12-29 21:58:38
+2
A:
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.
Matt Hamilton
2008-12-29 22:02:00
Many thanks. I thought it should be something simple like that. I just need to get a better handle on all of the availalbe properties. Again, thanks for the help.
2008-12-29 22:25:39