0
votes

enter image description hereI am working on a SSRS Report and I have two Parameters in the Prompt section, EmployeeID and EmployeeName respectively.

EmployeeName prompt depends on the EmployeeID prompt selected, can the EmployeeName be populated in a textbox once EmployeeID is selected.

Right now EmployeeID is being shown in a drop-down and the user have to go to the drop-down and select it, can it be done in a textbox?

Any help would be greatly appreciated!

1
I'm not clear what you are trying to do. What parameter is getting passed to the report? EmployeeID, EmployeeName or both? Are you populating the drop downs from a table, if so, what is the structure of that table. I'll post an answer based on a typical scenario and update it once you have responded if necessary.Alan Schofield

1 Answers

0
votes

Create your main report dataset (dsMain for exmaple) with a query something like

SELECT * FROM myTable WHERE EmployeeID = @EmployeeID

I'm assuming you have the first parameter setup and working correctly to return your list EmployeeIDs. For this example we'll call this parameter EmployeeID/

Create another dataset (called for example, dsEmployeeName) with a query something like

SELECT EmployeeName from myEmployeeTable WHERE EmployeeID = @EmployeeID

In the second parameter (the one you want showing in a text box), leave the 'Available Values' blank and set the 'Default Values' to be from a query. Choose dsEmployeeName as the dataset and choose EmployeeName as the Value.

NOTE This will only work the first time round. If you choose another value from the drop down, the name will not be updated.

I don't know your exact requirements but if you can get both the ID and name together, why do you need two parameters, one of which does nothing really as it's not passed to the report?