CacheReportDocumentEventArgs.SaveDocumentToFile(String) Method

Saves the current document to the specified file.

Namespace: DevExpress.XtraReports.Web

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

Declaration

public void SaveDocumentToFile(
    string fileName
)
Public Sub SaveDocumentToFile(
    fileName As String
)

Parameters

Type Name Description
String fileName

A String value specifying the PRNX file, to which the document should be saved.

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

See Also