Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxReportViewer.ShouldDisposeReport Property

Specifies whether a report should be disposed of when the Document Viewer is closed.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v24.2.Viewer.dll

NuGet Package: DevExpress.Blazor.Reporting.Viewer

#Declaration

public bool ShouldDisposeReport { get; set; }

#Property Value

Type Description
Boolean

True to dispose of the report when the viewer is closed; otherwise, false.

#Remarks

The ShouldDisposeReport setting determines whether the report is disposed when the viewer is closed. The default value is false because a report instance can exist independently of the viewer, and you should not to destroy it manually.

The ShouldDisposeReport property is not marked with the [Parameter] attribute, so you cannot use it as a component parameter in your Razor code. The following code snippet configures the ShouldDisposeReport option:

<DxReportViewer @ref="reportViewer" ...   />

@code {
    DxReportViewer reportViewer;

    protected override void OnAfterRender(bool firstRender) {
        reportViewer.ShouldDisposeReport = false;
    }
} 
See Also