TechNet
Export (0) Print
Expand All

Drillthrough, Drilldown, Subreports, and Nested Data Regions (Report Builder and SSRS)

 

Applies To: SQL Server 2016

You can organize data in a variety of ways to show the relationship of the general to the detailed. You can put all the data in the report, but set it to be hidden until a user clicks to reveal details; this is a drilldown action. You can display the data in a data region, such as a table or chart, which is nested inside another data region, such as a table or matrix. You can display the data in a subreport that is completely contained within a main report. Or, you can put the detail data in drillthrough reports, separate reports that are displayed when a user clicks a link.

rs_DrillThruDrilldownEtc

A. Drillthrough report

B. Subreport

C. Nested data regions

D. Drilldown action

All of these have commonalities, but they serve different purposes and have different features. Two of them, drillthrough reports and subreports, are actually separate reports. Nesting is a means of putting one data region inside another data region. Drilldown is an action you can apply to any report item to hide and show other report items. They all are ways that you can organize and display data to help your users understand your report better.

System_CAPS_ICON_note.jpg Note


You can create and modify paginated report definition (.rdl) files in Report Builder and in Report Designer in SQL Server Data Tools. Each authoring environment provides different ways to create, open, and save reports and related items.

This table summarizes these different traits. Details are in separate sections later in this topic. Drilldown isn't included in these comparisons because you can apply its showing and hiding action to any report item.

TraitSubreportDrillthroughNested
Uses dataset of main reportSame or differentSame or differentSame
Retrieves dataData retrieved at the same time as main reportData retrieved one drillthrough report at a timeData retrieved all at the same time as main report
Is processed and renderedWith the main reportWhen link is clickedWith the main report.
PerformsSlower (but retrieves all data with main report)Faster (but does not retrieve all data with main report)Faster (and retrieves all data with main report)
Uses parametersYesYesNo
Can be reusedAs report, or subreport or drillthrough report in other reportsAs report, or subreport or drillthrough report in other reportsCannot be reused.
Is locatedExternal to main report, same or different report serverExternal to main report, same report serverInternal to main report
Is displayedIn the main reportIn a different reportIn the main report

Arrow icon used with Back to Top link Back to Top

Datasets They Use

Subreports and drillthrough reports can use the same dataset at the main report, or they can use a different one. Nested data regions use the same dataset.

Retrieving Data

Subreports and nested data regions retrieve data at the same time as the main report. Drillthrough reports do not. Each drillthrough report retrieves data when a user clicks each link. This is significant if the data for the main report and the subordinate report must be retrieved at the same time.

Processing and Rendering

A subreport is processed as part of the main report. For example, if a subreport that displays order detail information is added to a table cell in the detail row, the subreport is processed once per row of the table and rendered as part of the main report. A drillthrough report is only processed and rendered when the user clicks the drillthrough link in the summary main report.

Performance

When deciding which to use, consider using a data region instead a subreport, particularly if the subreport is not used by multiple reports. Because the report server processes each instance of a subreport as a separate report, performance can be impacted. Data regions provide much of the same functionality and flexibility as subreports, but with better performance. Drillthrough reports have better performance than subreports, too, because they don't retrieve all the data at the same time as the main report.

Use of Parameters

Drillthrough reports and subreports typically have report parameters that specify which report data to display. For example, when you click a sales order number in a main report, a drillthrough report opens, which accepts the sales order number as a parameter, and then displays all the data for that sales order. When you create the link in the main report, you specify values to pass as parameters to the drillthrough report.

To create a drillthrough report or subreport, you must design the target drillthrough report or subreport first and then create a drillthrough action or add the reference to the main report.

Reusability

Subreports and drillthrough reports are separate reports. Thus, they can be used in a number of reports, or displayed as standalone reports. Nested data regions are not reusable. You cannot save them as report parts because they are nested in a data region. You can save the data region that contains them as a report part, but not the nested data region.

Location

Subreports and drillthrough reports are both separate reports, so they're stored external to the main report. Subreports can be on the same or a different report server, but drillthrough reports must be on the same report server. Nested data regions are part of the main report.

Display

Subreports and nested data regions are displayed in the main report. Drillthrough reports are displayed on their own.

Arrow icon used with Back to Top link Back to Top

Drillthrough Reports (Report Builder and SSRS)
Explains reports that open when a user clicks a link in a main report.

Subreports (Report Builder and SSRS)
Explains these reports that are displayed inside the body of a main report.

Nested Data Regions (Report Builder and SSRS)
Explains nesting one data region inside another, such as a chart nested inside a matrix.

Drilldown Action (Report Builder and SSRS)
Explains using the drilldown action to hide and show report items.

Specifying Paths to External Items (Report Builder and SSRS)
Explains how to refer to items that are external to the report definition file.

Report Parameters (Report Builder and Report Designer)

Community Additions

ADD
Show:
© 2016 Microsoft