Back to Devexpress

DbDocumentStorage Class

xtrareports-devexpress-dot-xtraprinting-dot-caching.md

latest2.4 KB
Original Source

DbDocumentStorage Class

A database storage used by the CachedReportSource component to cache the document that it generates to display/export/print a report.

Namespace : DevExpress.XtraPrinting.Caching

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
public class DbDocumentStorage :
    DocumentStorage,
    IDisposable
vb
Public Class DbDocumentStorage
    Inherits DocumentStorage
    Implements IDisposable

Remarks

You can associate the CachedReportSource component with a DbDocumentStorage object to store the generated documents in the table of the database specified by the ConnectionString/ConnectionName property.

The following code demonstrates how to create a DbDocumentStorage object that stores documents in a SQL Server Express database.

csharp
using DevExpress.XtraPrinting.Caching; 
... 
var connectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=MyStorage;Integrated Security=True;MultipleActiveResultSets=True"; 
var storage = new DbDocumentStorage(connectionString);
vb
Imports DevExpress.XtraPrinting.Caching
'...
Private connectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=MyStorage;Integrated Security=True;MultipleActiveResultSets=True"
Private storage = New DbDocumentStorage(connectionString)

Inheritance

Object DocumentStorage DbDocumentStorage

See Also

DbDocumentStorage Members

DevExpress.XtraPrinting.Caching Namespace