Create an ASP.NET Application with the Document Viewer

This tutorial describes how to use the DevExpress Template Gallery to create a new ASP.NET WebForms or ASP.NET MVC application containing the HTML5 Document Viewer:

  1. Select FILE | New | Project in the main menu or press CTRL+SHIFT+N to create a new project.

    create-new-application-windows-forms

  2. 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.1 Template Gallery.

    asp-net-mvc-reports-create-devexpress-template-gallery

    Specify the application name and click OK.

  3. In the invoked DevExpress Template Gallery, select Reporting Web Application under the ASP.NET WebForms or ASP.NET MVC category and click Run Wizard.

    web-template-gallery-reporting-application

  4. 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.aspx page in ASP.NET WebForms or the Viewer view file in ASP.NET MVC).

    Tip

    You can add both the Web Document Viewer and Report Designer to the application.

    web-reporting-project-wizard-select-viewer

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

See Also