Blog

Using URLs in SQL Server Reporting Services - Part 2

Linking SSRS reports across Visual Studio project folders

Read
Blog

Topic:

Blog

Industry trends, regulatory updates, and expert perspective on the MEDITECH ecosystem.

TL/DR

Building on Part 1's external URL technique, Part 2 shows how to navigate between SSRS reports stored in different Visual Studio project folders using parameterized URLs.

  • Locate the target report's base URL from Report Server and append parameters using &ParamName=Value syntax
  • Construct the full URL string in your T-SQL stored procedure for easier maintenance
  • Ensure users have folder-level permissions for every report folder accessed through URL navigation

Use URL-based navigation to connect SSRS reports across different project folders by constructing parameterized links in T-SQL.

Article content

Navigating Between Reports

In Part 1 of this blog, we explored how to use URL-based navigation in SSRS to link to external websites. In Part 2, we'll take it a step further and use the same technique to navigate between reports located in different Visual Studio project folders.

Discharges by Date Range

Our starting report lists discharged patient accounts within a specified timeframe. It contains a Medical Record Number (MRN) field that will serve as our navigation link. This report resides in a Visual Studio project folder called "Samples."

Patient Dashboard

The target report displays patient-level information including demographics, insurance details, and visit history. It accepts a single parameter: the patient's MRN. This report is stored in a Visual Studio project labeled "Utilities."

Find the URL

To establish the connection, you must first locate the published Patient Dashboard report's base URL. Navigate through the Report Server to obtain the complete path. The example URL looks like this:

http://lima/ReportServer_DEV/Pages/ReportViewer.aspx?/HowardTest/Utilities/PatientDashboard

Add the Parameter(s) to the URL

Parameters are appended using the syntax &MRN=<<MedicalRecordNumber>>. A complete example with an actual MRN value:

http://lima/ReportServer_DEV/Pages/ReportViewer.aspx?/HowardTest/Utilities/PatientDashboard&MRN=N000001533

Pro Tip: Multiple parameters follow the format [URL]&MRN=N000001532&OtherParam=12345

Build the URL in Your Data Query

Rather than using SSRS expressions, we recommend constructing the URL string within the T-SQL stored procedure as a database field. This approach simplifies modifications and maintenance. A best practice involves storing URLs in a reference table for easy updates if they happen to change.

Add the New URL Field to the Action

The final step involves modifying the text box properties in Visual Studio. Select the Go to URL option and designate the properly formatted URL field as the target.

We're Done

Upon clicking the MRN field in the Discharges report, users navigate directly to the Patient Dashboard with the MRN parameter passed through the URL.

Don't Forget Permissions

Users must possess appropriate access permissions for all report folders they access via URL, as permissions are set at the folder level in Report Manager.