Back to Devexpress

XRControl.RootReport Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrcontrol-f75f4a83.md

latest4.8 KB
Original Source

XRControl.RootReport Property

Provides access to the report to which the control belongs.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[Browsable(false)]
public virtual XtraReport RootReport { get; }
vb
<Browsable(False)>
Public Overridable ReadOnly Property RootReport As XtraReport

Property Value

TypeDescription
XtraReport

An XtraReport value.

|

Remarks

This property returns a report that contains all bands and detail reports. A detail report, within which a control may reside, is accessed via the XRControl.Report property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RootReport property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-winforms-custom-report-storage/CS/XpoReportStorage.cs#L106

csharp
XRSubreport xrSubreport = context.Instance as XRSubreport;
if (xrSubreport.RootReport !=
    null && xrSubreport.RootReport.Extensions.TryGetValue("StorageID", out storageID)) {

reporting-wpf-create-report-in-code/CS/RuntimeReportsApplication/MainWindow.xaml.cs#L195

csharp
private void AdjustTableWidth(XRTable table) {
    XtraReport report = table.RootReport;
    table.WidthF = report.PageWidth - report.Margins.Left - report.Margins.Right;

reporting-winforms-sql-data-source-runtime/CS/RuntimeSqlDataSourceReportSample/ReportCreator.cs#L159

csharp
{
    XtraReport report = table.RootReport;
    table.WidthF = report.PageWidth - report.Margins.Left - report.Margins.Right;

reporting-winforms-custom-report-storage/VB/XpoReportStorage.vb#L113

vb
Dim xrSubreport As XRSubreport = TryCast(context.Instance, XRSubreport)
If xrSubreport.RootReport IsNot Nothing AndAlso xrSubreport.RootReport.Extensions.TryGetValue("StorageID", storageID) Then
    Dim result As List(Of String) = GetUrlsCore(AddressOf CanPassId)

reporting-wpf-create-report-in-code/VB/RuntimeReportsApplication/MainWindow.xaml.vb#L204

vb
Private Sub AdjustTableWidth(ByVal table As XRTable)
    Dim report As XtraReport = table.RootReport
    table.WidthF = report.PageWidth - report.Margins.Left - report.Margins.Right

reporting-winforms-sql-data-source-runtime/VB/RuntimeSqlDataSourceReportSample/ReportCreator.vb#L154

vb
Private Shared Sub AdjustTableWidth(ByVal table As XRTable)
    Dim report As XtraReport = table.RootReport
    table.WidthF = report.PageWidth - report.Margins.Left - report.Margins.Right

See Also

Report

XRControl Class

XRControl Members

DevExpress.XtraReports.UI Namespace