NavigateToReportAction Class
Contains settings that allows you to implement a drill-through report.
Namespace: DevExpress.XtraReports.Interactivity
Assembly: DevExpress.XtraReports.v24.1.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Remarks
A drill-through report allows you to click on a report element and navigate to a detail report within the same print preview window.
To create drill-through reports, use the Action
property of report controls (XRControl
descendants). The property provides access to NavigateToReportAction
. NavigateToReportAction
allows you to specify the detail report instance or URL to define a master-detail relationship and obtain a collection of detail report parameter bindings.
The following code snippet shows how to define master-detail relationships between Category and Product reports within a single project:
using DevExpress.XtraReports.Interactivity;
using DevExpress.XtraReports.UI;
namespace Drill_through_example {
public partial class XtraReportCategories : DevExpress.XtraReports.UI.XtraReport {
public XtraReportCategories(){
InitializeComponent();
// Create a NavigateToReportAction instance and specify its settings
NavigateToReportAction cellAction = new NavigateToReportAction();
cellAction.ReportSource = new XtraReportProducts();
// Assign the NavigateToReportAction object to the control’s Action property
tableCell6.Action = cellAction;
}
}
}
When you switch to the preview, you can now click on the Category value in the table and navigate to the detail report that contains Product values.
A Breadcrumb
control automatically appears below the Document Viewer toolbar and allows you to navigate back to the original report.
Review the following tutorial for more information on how to implement drill-through functionality in the UI: Create Drill-Through Reports.