CHAPTER 6 BUILDING REPORTS
Follow these steps:
- While on the Design tab, right-click the Parameters folder in the Report Data
pane and select Add Parameter. - Enter Branch_URL for the parameter name.
- Enter My Branch for the prompt.
- In the Available Values section, enter the following labels/values: Branch1 =
BrianMcDonaldServer, Branch2 = ShawnMcGeeheeServer, and Branch3 =
RodneyLandrumServer. - Set the default value to be BrianMcDonaldServer.
- Return to the Action tab for the Discipline field, and apply the new expression
="http://" & Parameters!Branch_URL.Value & "/" & Fields!DisciplineID.Value. - Preview the report. Notice that you have a new parameter drop-down list
called My Branch that was set to Branch1 based on the default value of
BrianMcDonaldServer.
With the URL location assigned to be that of the parameter Branch_URL, whenever a different
branch is selected from the drop-down list, the appropriate server for that branch will be selected.
Jumping to a Report
Quite possibly the most useful hyperlink action in SSRS is the ability to link to another report, called a
drill-through report, from a specified location within the current report. In this section, you will link to a
new report, the Patient Survey Letter report, from the Employee Listing report. The Patient Survey Letter
report uses a single textbox and demonstrates how you can take advantage of the new rich text
formatting made available with SSRS 2008 to form a mail merge style report using both HTML
formatting as well as literal text strings, all formatted independently.
You will tie the two reports —the Employee Listing report and the Patient Survey Letter report—
together by creating a hyperlink from one to the other. You will also pass a parameter value along with
the hyperlink to narrow the results of the Patient Survey Letter report when it is called from the
Employee Listing report. The parameter values will be PatID, ServiceMonth, and ServiceYear.
To add the hyperlink action that links to the Patient Survey Letter report, return to the Action tab,
this time from the Patient Name detail row textbox within the Employee Listing report. The Patient
Name detail textbox is in the second table, shown in Figure 6-19.