Skip to main content
A newer version of this page is available. .

RestoreReportDocumentFromCacheEventArgs.RestoreDocumentFromStream(Stream) Method

Loads a report document from the specified stream.

Namespace: DevExpress.XtraReports.Web

Assembly: DevExpress.XtraReports.v19.1.Web.WebForms.dll

NuGet Package: DevExpress.Web.Reporting

Declaration

public void RestoreDocumentFromStream(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A Stream object, from which the report document should be loaded.

Remarks

The RestoreDocumentFromStream method is intended to implement caching of a web report.

To accomplish this task, you need to handle the ReportViewer.CacheReportDocument event, and if a report document is already generated, save it to a memory stream via the CacheReportDocumentEventArgs.SaveDocumentToMemoryStream method. Then, you need to handle the ReportViewer.RestoreReportDocumentFromCache event, and if the document is already stored in cache, restore it via the RestoreDocumentFromStream method.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RestoreDocumentFromStream(Stream) method.

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.

See Also