Create an ASP.NET MVC Application with the Document Viewer
This tutorial describes how to use the DevExpress Template Gallery to create a new ASP.NET MVC application containing the HTML5 Document Viewer:
Select FILE | New | Project in the main menu or press CTRL+SHIFT+N to create a new project.
In the invoked New Project dialog, expand the Installed category, select a programming language (Visual C# or Visual Basic) in the Templates section and select the DevExpress v18.2 Template Gallery.
Specify the application name and click OK.
In the invoked DevExpress Template Gallery, select Reporting Web Application under the ASP.NET MVC category and click Run Wizard.
On the Reporting Control Settings wizard page, enable the Create Viewer Page check box to add the Document Viewer to the web application (the Viewer view file).
You can add both the Web Document Viewer and Report Designer to the application.
This page provides the following main control settings:
- Create Report Storage - Specifies whether to create server-side storage for web reports. Enabling this option adds a new class inherited from the abstract ReportStorageWebExtension class implementing the methods you need to override, and registers this custom storage in the application. The Document Viewer does not allow you to show report layouts with subreports if you did not implement the report storage.
- Report Storage Name - Specifies the report storage class name.
- Session State - Specifies the type of session support to handle requests. Choose Required to enable the Document Viewer to access values stored in HttpContext.Session.
- Log Errors and Events - Specifies whether to log server-side errors and events related to the Document Viewer functionality to a particular file using the LoggerService class.
- Add Sample Data Source - Specifies whether to add a sample database file to an application and register the connection string in the web.config file.
Click Create Project to complete the creation process.