How To Create Drill Down Reports in SSRS

Tue May 14, 2024

Introduction:
A drill-down report allows users to start with summary information and then "drill down" into the details by clicking on specific elements. In this blog, we will walk you through the process of creating a drill-down report in SSRS.

Step 1:
Create a New SSRS ProjectLaunch SQL Server Data Tools (SSDT) or SQL Server Reporting Services (SSRS).
Create a new Reporting Services project or open an existing one.

Step 2:
Create a Data SourceIn the Solution Explorer, right-click on the "Shared Data Sources" folder and select "Add New Data Source."
Configure the data source to connect to your SQL Server database.

Configure the data source to connect to your SQL Server database.

Step 3:
Create a DatasetRight-click on the "Datasets" folder and select "Add Dataset."
In the Dataset Properties window, choose your data source.
Write a SQL query that retrieves the data for your report. Make sure it includes the fields you want to use for the drill-down.
Click "OK" to create the dataset.

Step 4:
Design the Main ReportDrag and drop a Tablix control onto your report layout. This will be the main table for your report.
In the Tablix Data Region, bind it to the dataset you created in the previous step.
Add the summary-level data fields to the Tablix.
Customize the appearance and formatting of the table as desired.
Step 5:
Add a Toggle ActionSelect the cell or text box in your Tablix that you want to use as the drill-down toggle.
Right-click on it and choose "Text Box Properties."

In the Text Box Properties window, go to the "Action" tab.
Select "Go to report."
Choose the same report you are working on as the target report.
Click "Add Parameters" and map the parameters as required.

Step 6:
Design the Drill-Down ReportRight-click on the project in the Solution Explorer and select "Add" > "New Item."
Choose "Report" and give it a name (e.g., "DrillDownReport").
In this report, you can add more details and filter them using the parameters passed from the main report.

Step 7:
Create a Drill-Down LinkGo back to the main report (the one created in Step 4).
In the Tablix cell where you want the user to click to drill down, add a hyperlink.
Configure the hyperlink to jump to your drill-down report (e.g., "DrillDownReport").
Pass the necessary parameters to filter the data in the drill-down report.

Step 8:
Test the Drill-Down ReportRun the main report to see the summary data.
Click on the designated drill-down area to access the detailed report.
Verify that the drill-down report displays the data based on the parameters passed.

Step 9:
Deploy the ReportDeploy your report to a report server or your desired deployment location.

Conclusion
Creating drill-down reports in SQL Server Reporting Services (SSRS) can greatly enhance the user experience and help users dive deeper into the data. By following the steps outlined in this blog, you can create interactive and informative reports that provide both summary-level and detailed information. Mastering this feature will empower you to deliver more valuable insights to your users through SSRS.

Vijay Kashyap
A California-based travel writer, lover of food, oceans, and nature.