This example demonstrates how to use the PageInfoDataProviderBase service to display information in the XRPageInfo control.
The WebDocumentViewer extension uses the CachedDocumentSource component to store the document and improve document rendering performance. An XtraReport instance, passed to the WebDocumentViewer Bind method, is disposed of, so any services or events that affect the export result (the PageInfoDataProviderBase service in this case) are detached from the report/document.
You should call the DefaultWebDocumentViewerContainer.DisableCachedDocumentSource method at application startup to disable caching.
To configure a report before document creation, create the WebDocumentViewerOperationLogger class descendant and add an instance of this class to the DefaultWebDocumentViewerContainer at application startup. The WebDocumentViewerOperationLogger service passes the HttpContext instance for the current HTTP request to the PageInfoDataProviderBase service.
To change the default display text of the XRPageInfo control, add a custom PageInfoDataProviderBase service to the XtraReport.PrintingSystem.
Add the code that analyzes the HttpContext and returns the text for display in the XRPageInfo control to the PageInfoDataProviderBase.GetText method.
- Global.asax.cs (Global.asax.vb)
- CustomWebDocumentViewerOperationLogger.cs (CustomWebDocumentViewerOperationLogger.vb)
- CustomPageInfoDataProvider.cs (CustomPageInfoDataProvider.vb)
- How to use client timezone in a report's PageInfo
- XRPageInfo: How to provide custom page numbering for a merged report
(you will be redirected to DevExpress.com to submit your response)