Skip to content

DevExpress-Examples/reporting-mvc-display-information-in-xrpageinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for Web (ASP.NET MVC) - How to Display the Name of the Current Logged in User in a Report

This example demonstrates how to use the PageInfoDataProviderBase service to display information in the XRPageInfo control.

Implementation Details

Disable Caching

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.

Register the WebDocumentViewerOperationLogger Service

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.

Implement 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.

Files to Look At

Documentation

Related SC Tickets

About

Use the PageInfoDataProviderBase service to display information in the XRPageInfo control.

Topics

Resources

License

Stars

Watchers

Forks