Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 6  BUILDING REPORTS


Figure 6-19. Patient Name detail textbox to add Go to Report hyperlink action

After clicking the Go to Report button, a drop-down list appears with all the reports that are
available in the current solution. If the report has already been deployed to the report server and is not in
the current solution, you can use the relative path based on the target server that is defined in the
project. In this example, the target server is http://localhost/reportserver. You could add the relative
path to any report on the report server. In this case, select the PatientSurveyLetter.rdl report, and then
click the Add button three times to add PatID, ServiceMonth, and ServiceYear. Choose the parameters
that are populated when the report is selected. Later in the “Setting Report Parameters with Stored
Procedures” section, we will show how to add these parameters to the report. Choose PatID as the
parameter, and assign its value as =Fields!PatID.Value, which is a field in the Employee Listing report
that has a corresponding value to the PatID parameter. Next create an expression for ServiceMonth as
=MONTH(Fields!ChargeServiceStartDate.Value) and ServiceYear as
=YEAR(Fields!ChargeServiceStartDate.Value) respectively. After applying the new action, if the Patient
Name textbox is clicked when previewing the Employee Listing report, the Patient Survey Letter report
will be called and the parameter passed, thus narrowing the dataset for that report to only that for the
selected patient.
Free download pdf