New to Telerik Reporting? Download free 30-day trial

Drillthrough/Navigate To Report Action

A drillthrough report is a report that a user opens by clicking a link within another report. Drillthrough reports commonly contain details about an item that is contained in an original summary report. For example, you might have a sales summary report with a list of orders and sales totals. When a user clicks an order number in the summary list, another report opens that contains details about the order.

A drillthrough report serves a different purpose than a subreport. 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.

A drillthrough report typically contains parameters that are passed to it by the summary report. When you set a drillthrough report link on a report item, set a value for the parameter of the target report as well. When the user clicks the link in the summary report, the target detail report opens and displays the information for that specific value.

To define a drill-through action add a NavigateToReportAction on an item.

The Target report of a drill-through action should always have a default constructor, so it can be instantiated.

Adding a Drillthrough/Navigate To Report Action

A report can contain links to other reports. The report that opens when you click the link in the main report is known as a drillthrough report. Drillthrough reports must be published to the same report server as the main report, but they can be in different folders. You can add a drillthrough link to any item that has an Action property.

We recommend the usage of TypeReportSource ('Type name' option) or UriReportSource ('Url or file' option) in the Load Report Dialog) on configuring the target report. InstanceReportSource ('Object instance' option) is only supported for WinForms and WPF Report Viewers in Embedded mode.

Adding a drillthrough action using the Report Designer

  1. In the Design view, right-click a report item to which you want to add a link and then click Properties.
  2. In the item's Properties dialog box, click Action.
  3. Select Navigate to Report. An additional section appears that allows you to select a ReportSource.
  4. In the Choose a Report Source dialog, select how you would navigate to the report, For this example we would use Type Report Source , click that option and select the report that you would like to navigate to. If you have to specify parameters for the drillthrough report, follow the next step.
  5. Click Edit Parameters button - Edit Parameters dialog appears. Click New. In the Parameter Name column select the name of the report parameter in the drillthrough report. In the Parameter Value , type or select the value to pass to the parameter in the drillthrough report.
  6. To test the link, run the report and click the report item with the applied Action. For TextBoxes, it is helpful to change the color and effect of the text to indicate that the text is a link. For example, change the color to blue and the effect to underline by setting the corresponding Font properties of the TextBox.

Adding a drillthrough action programmatically

Telerik.Reporting.TypeReportSource reportSource = new Telerik.Reporting.TypeReportSource();
reportSource.TypeName = "ReportLibrary1.Report1, ReportLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
reportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));

Telerik.Reporting.NavigateToReportAction reportAction1 = new Telerik.Reporting.NavigateToReportAction();
reportAction1.ReportSource = reportSource;
textBox1.Action = reportAction1;
Dim reportSource As New Telerik.Reporting.TypeReportSource()
reportSource.TypeName = "ReportLibrary1.Report1, ReportLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
reportSource.Parameters.Add(New Telerik.Reporting.Parameter("OrderNumber", "SO43659"))

Dim reportAction1 As New Telerik.Reporting.NavigateToReportAction()
reportAction1.ReportSource = reportSource
textBox1.Action = reportAction1

Setting ReportSource for Drillthrough/Navigate To Report Action

This article includes details on how to specify a target report for a Navigate to Report (Drill-through) Action. You will need a ReportSource object.

When you reference reports stored in the Telerik Report Server ensure using the [CategoryName]/[ReportName] path for the URI as specified in the article Working with Report Server Reports.

Setting the ReportSource through the Report Designer

  1. In the Design view, right-click a report item to which you want to add a drill-through action and then click Properties.
  2. In the item's Properties dialog box, click Action.
  3. Select Navigate to Report. An additional section appears that allows you to select a ReportSource.
  4. In the Choose a Report Source dialog, select how you would navigate to the report, For this example, we would use Type Report Source, click that option, and select the report that you would like to navigate to. If you have to specify parameters for the drillthrough report, follow the next step.
  5. Click Edit Parameters button - Edit Parameters dialog appears. Click New. In the Parameter Name column select the name of the report parameter in the drillthrough report. In the Parameter Value, type or select the value to pass to the parameter in the drillthrough report.

Setting the Report Source Programmatically

Telerik.Reporting.TypeReportSource reportSource = new Telerik.Reporting.TypeReportSource();
reportSource.TypeName = "ReportLibrary1.Report1, ReportLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
reportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));

Telerik.Reporting.NavigateToReportAction reportAction1 = new Telerik.Reporting.NavigateToReportAction();
reportAction1.ReportSource = reportSource;
textBox1.Action = reportAction1;
Dim reportSource As New Telerik.Reporting.TypeReportSource()
reportSource.TypeName = "ReportLibrary1.Report1, ReportLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
reportSource.Parameters.Add(New Telerik.Reporting.Parameter("OrderNumber", "SO43659"))

Dim reportAction1 As New Telerik.Reporting.NavigateToReportAction()
reportAction1.ReportSource = reportSource
textBox1.Action = reportAction1

The Standalone Report Designer includes only XmlReportSource and UriReportSource options due to the format of the produced reports. In Visual Studio Report Designer you can use all available Report Sources.

If the report will be displayed in an HTML5-based Report Viewer, the main report is rendered in HTML and it is loaded at the client. The rendered content contains a link rendered for the NavigateToReportAction, that will not be valid and working if the target report is specified via InstanceReportSource or XmlReportSource.

The Standalone Report Designer includes only XmlReportSource and UriReportSource options due to the format of the produced reports. In Visual Studio Report Designer you can use all available Report Sources.

If the report will be displayed in an HTML5-based Report Viewer or the Silverlight ReportViewer, the main report is rendered in HTML (or XAML respectively) and it is loaded at the client. The rendered content contains a link rendered for the NavigateToReportAction, that will not be valid and working if the target report is specified via InstanceReportSource or XmlReportSource.

In this article