Back to Devexpress

FileDocumentStorage Class

corelibraries-devexpress-dot-xtraprinting-dot-caching-39c1347f.md

latest2.6 KB
Original Source

FileDocumentStorage Class

A file storage used by the CachedReportSource and CachedReportSourceWeb objects to cache the document that they generate to display/export/print a report.

Namespace : DevExpress.XtraPrinting.Caching

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public class FileDocumentStorage :
    DocumentStorage
vb
Public Class FileDocumentStorage
    Inherits DocumentStorage

Remarks

You can associate the CachedReportSource component with a FileDocumentStorage object using the CachedReportSourceBase.Storage property. A file document storage stores generated documents as a set of files in the directory specified by the FileDocumentStorage.DocumentFolder property.

The following code demonstrates how to create a FileDocumentStorage object that stores documents in the %appData% folder.

csharp
using DevExpress.XtraPrinting.Caching; 
using System.IO; 
... 
var appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 
var path = Path.Combine(appDataPath, "MyApplicationFolder"); 
var storage = new FileDocumentStorage(path);
vb
Imports DevExpress.XtraPrinting.Caching
Imports System.IO
'...
Private appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Private path = System.IO.Path.Combine(appDataPath, "MyApplicationFolder")
Private storage = New FileDocumentStorage(path)

Inheritance

Object DocumentStorage FileDocumentStorage

See Also

FileDocumentStorage Members

DevExpress.XtraPrinting.Caching Namespace