Back to Devexpress

Use DevExpress Visual Studio Templates to Create an ASP.NET Core Reporting App with a Document Viewer

xtrareports-400044-web-reporting-asp-net-core-reporting-document-viewer-in-asp-net-applications-quick-start-create-an-aspnet-core-application-with-a-document-viewer.md

latest2.3 KB
Original Source

Use DevExpress Visual Studio Templates to Create an ASP.NET Core Reporting App with a Document Viewer

  • Jan 21, 2025
  • 4 minutes to read

This tutorial describes how to use the DevExpress Template Gallery to generate a basic ASP.NET Core application that contains the Document Viewer control.

Note

We implemented a new dotnet CLI-powered Project Wizard you can use across multiple IDEs. The new wizard suggests additional templates: Cross-IDE Project Template Kit.

Follow the steps below to create an ASP.NET Core application with a Document Viewer:

  • Ensure that Node.js 10.0 or later with the npm package manager is installed on your computer. Use the node -v and npm -v console commands on 64-bit Windows systems to check package versions (if the package’s version does not match the version you installed, check the PATH environment variable’s value - as there may be a conflict between an x86 and x64 package).

Create a New Project

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

  2. Select the DevExpress v25.2 Web App Template Gallery , and click Next :

  3. Specify a project name and location, and click Create :

  4. In the invoked DevExpress Template Gallery, select Reporting Application in the .NET category.

  5. Set Add Viewer Page to true to add the Document Viewer (the Viewer.cshtml view) to the web application. You can add a Web Document Viewer and a Report Designer to the application.

  6. After Visual Studio has created the application, right-click the package.json file in Solution Explorer and choose Restore Packages.

  7. Optional. You can configure the Document Viewer to load a different report when the application starts. Navigate to the Views | Home | Viewer.cshtml file and replace the built-in report name ( TestReport in this example) with the name of your report:

  8. Run the project to see the result: