Skip to main content
All docs
V24.2

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