Coder Social home page Coder Social logo

devexpress-examples / reporting_webdocumentviewer-xrpageinfo-with-pageinfousername-display-the-name-of-a-logged-t484189 Goto Github PK

View Code? Open in Web Editor NEW
0.0 56.0 1.0 1.01 MB

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

License: Other

C# 2.66% JavaScript 93.17% HTML 0.57% ASP.NET 0.06% Visual Basic .NET 3.54%
dotnet mvc-report asp-net-mvc reporting-for-mvc

reporting_webdocumentviewer-xrpageinfo-with-pageinfousername-display-the-name-of-a-logged-t484189's Introduction

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

reporting_webdocumentviewer-xrpageinfo-with-pageinfousername-display-the-name-of-a-logged-t484189's People

Contributors

briandx avatar devexpressexamplebot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

nombrote

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.