The requested page is not available for the requested platform. You are viewing the content for Default platform.

RestoreReportDocumentFromCacheEventArgs.RestoreDocumentFromFile(String) Method

Loads a report document from the specified file.

Namespace: DevExpress.XtraReports.Web

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


public void RestoreDocumentFromFile(
    string fileName
Public Sub RestoreDocumentFromFile(
    fileName As String


Name Type Description
fileName String

A String value specifying the PRNX file, from which the document should be loaded.


The RestoreDocumentFromFile 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 public location via the CacheReportDocumentEventArgs.SaveDocumentToFile method. Then, you need to handle the ReportViewer.RestoreReportDocumentFromCache event, and if the document is already stored in cache, restore it via the RestoreDocumentFromFile method.

See Also