Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Navigation and Layout Extensions
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Collapse]Report Extensions
   [Collapse]Document Viewer
     HTML5 Document Viewer
     ASP.NET Document Viewer
     ASP.NET Document Viewer Toolbar
   [Expand]Report Designer
  [Expand]SpellChecker
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

ASP.NET Document Viewer

The Document Viewer renders report documents on ASP.NET MVC web pages. It provides a toolbar to navigate, export and print a document. If a report has bookmarks assigned to its elements, the Document Viewer provides a Document Map to navigate through the report. The Document Viewer also provides a user interface to request report parameter values on the client.

The Document Viewer can publish documents supplied by a remote report service or Report Server, which is illustrated in the following example: How to: Preview, Export and Print a Remotely Created Document in an ASP.NET MVC Application.

To see the Document Viewer in action, refer to the following online demo: ASP.NET MVC Reporting.

Expanded Implementation Details

To use a Document Viewer in ASP.NET MVC, use the DocumentViewerExtension class. To add a Document Viewer extension to a View, call the ExtensionsFactory.DocumentViewer helper method. This method provides a parameter that returns the DocumentViewerSettings. Use these settings to customize the Document Viewer extension.

As a client-side counterpart of an MVCxDocumentViewer, use the MVCxClientDocumentViewer class.

The following code demonstrates how to add a Document Viewer to a view.

Partial view code - "ReportViewerPartial" (ASPX):

Partial view code - "ReportViewerPartial" (Razor):

Controller code:

Expanded See Also

How would you rate this topic?​​​​​​​