CachedReportSourceWeb Class

https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.Web.CachedReportSourceWeb

An object that acts as a mediator between a report and a Web Document Viewer.

NamespaceDevExpress.XtraReports.Web

Assembly: DevExpress.XtraReports.v20.1.Web.dll

#Declaration

public class CachedReportSourceWeb :
    CachedReportSourceBase

#Returned By

Properties and methods that return CachedReportSourceWeb instances:

#Remarks

Use the CachedReportSourceWeb object to display a report in a Document Viewer. This object creates a report document and caches each generated page to a storage. Only pages displayed in a Document Viewer are stored in memory.

Pass a target report as a parameter to the CachedReportSourceWeb object's constructor.

using DevExpress.XtraReports.Web;
using DevExpress.XtraPrinting.Caching;
//...
var cachedReportSource = new CachedReportSourceWeb(new XtraReport1()); 

CachedReportSourceWeb object uses a MemoryDocumentStorage storage to cache a generated document. This storage stores a document in memory in a compact way. Use the UseFileExportedDocumentStorage (.NET Framework) / UseFileDocumentStorage (.NET Core) method to store the report documents in the File Document Storage instead. You can also use the DbDocumentStorage storage or implement a custom one. Register your IDocumentStorageProvider to manage document storages.

#Display Large Reports

Use the OpenReport(String) (Web Forms)) / Bind(String) (MVC) / Bind(String) (ASP.NET Core MVC) method to bind the Document Viewer to a report by the unique report name. Implement the ICachedReportSourceWebResolver interface to associate a report's unique name with the CachedReportSourceWeb object that owns the report. A Document Viewer uses the ICachedReportSourceWebResolver object to find an appropriate CachedReportSourceWeb object by a report's unique name and requests the found object to generate a report document, when required.

You can also use the OpenReport(CachedReportSourceWeb) (Web Forms) / Bind(CachedReportSourceWeb) (MVC) method to directly bind a Document Viewer to the CachedReportSourceWeb object that owns a report . However, the report's interactive features are only available to users until the application pool is recycled. The document needs to be regenerated to make interactive features available. However, after the application pool is recycled, the document cannot be regenerated, because the initial report cannot be found.

#Merge Large Reports

When you merge large documents, use the CachedReportSourceWeb object's CreateDocument() method to generate a document. Then use the XtraReport.ModifyDocument or CachedReportSourceWeb.ModifyDocument method to manipulate the generated document's page set.

See the Merge Reports topic for more information on how to merge reports.

#Limitations

  • The CachedReportSourceWeb component cannot be associated with reports that include a PrintableComponentContainer.

  • The Page.AddBrick method does not work if you use the CachedReportSource/CachedReportSourceWeb component to create report documents.

  • When you use the CachedReportSourceWeb component to generate a report document, the PrintOnPage event is raised each time a page with the current control is created. In this connection, the total number of pages is unknown at the moment the event fires and you cannot use the PageCount property in the event handler.

  • The RollPaper mode is not supported.

  • When you create a report document, the CachedReportSourceWeb component generates information for a single-file export. This increases memory consumption. Disable the AllowSingleFileExport option if you do not plan to export the generated document in single-file mode.

#Implements

IComponent

IDisposable

IDocumentSource

ILink

IServiceProvider

#Inheritance

ObjectMarshalByRefObjectComponentCachedReportSourceBase

CachedReportSourceWeb

SEE ALSO

CachedReportSourceWeb Members

DevExpress.XtraReports.Web Namespace

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值