RestoreReportDocumentFromCacheEventArgs.RestoreDocumentFromStream(Stream) Method

Loads a report document from the specified stream.

Namespace: DevExpress.XtraReports.Web

Assembly: DevExpress.XtraReports.v18.2.Web.WebForms.dll


public void RestoreDocumentFromStream(
    Stream stream
Public Sub RestoreDocumentFromStream(
    stream As Stream


Type Name Description
Stream stream

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

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.

See Also