The requested page is not available for the requested platform. You are viewing the content for Default platform.

Create an ASP.NET Core Angular Application with a Report Designer

  • 5 min to read

This tutorial describes how to use the DevExpress Template Gallery or .NET Core command line interface (CLI) to generate a basic ASP.NET Core Angular application that contains the End-User Report Designer control.


See ASP.NET Core Reporting for information about DevExpress Reporting in ASP.NET Core applications.

The Add a New Report to an ASP.NET Core Application tutorial provides instructions on how to add a report to an ASP.NET Core application.

Perform the following steps to create an ASP.NET Core application in Visual Studio:

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


  2. Select the Installed | Visual C# | Web category in the invoked New Project dialog and select the DevExpress v19.2 Template Gallery template.


    Specify the application name and click OK.

  3. Select Reporting Angular Application from the NET Core category in the invoked DevExpress Template Gallery and click Create Project.


  4. Enable the Add Designer Page checkbox in the invoked DevExpress ASP.NET MVC Project Wizard to add the Report Designer (the report-designer.html file) to the web application.


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


    Use the following Report Designer settings:

    Click Create Project to apply these settings to the project.

  5. Once Visual Studio created the application, right-click the Dependencies | npm folder in the Solution Explorer window and choose Restore Packages (you should run Visual Studio with administrator privileges).

  6. You can specify a report to open in the Report Designer when the application starts. Navigate to the ClientApp | app | components | report-designer | report-designer.ts file and replace the built-in unique report name with your report's name:

    reportUrl: string = "TestReport";

    The ReportStorageWebExtension1 storage saves the reports you change in the Report Designer to a dictionary. You can inherit your custom class from the abstract ReportStorageWebExtension class and implement logic to save reports to any other location.

Use the Console

Use the .NET Core command line interface (CLI) to create an ASP.NET Core Angular Reporting application from the console:

  1. Open the console and type the following command to install DevExpress CLI templates:

    dotnet new -i "DevExpress.DotNet.Web.ProjectTemplates"

    The console displays the list of templates installed on your machine after the installation command is finished.

  2. Refer to the page and obtain the NuGet Feed URL. This URL includes your personal feed authorization key and is used to install NuGet packages for the Report Designer.

  3. Use the command below to create a new project with the Report Designer and provide it with a sample data source. Pass the the NuGet Feed URL as a parameter.

    dotnet new dx.reporting.angular --nuget-feed{auth_key}/api --name ReportDesignerApp --add-viewer false --add-data-source true

    DevExpress Reporting templates have the following parameters:

    • -nf | --nuget-feed (required) - Specifies your personal DevExpress NuGet Feed URL.
    • -ad | --add-designer - Specifies whether to create a web page with the Report Designer. The default value is true.
    • -av | --add-viewer - Specifies whether to create a web page with the Document Viewer. The default value is true.
    • -ads | --add-data-source - Specifies whether to add a sample database file to a project and register the corresponding connection string in the application's configuration file. The default value is false.
    • -ul | --use-logger - Specifies whether to log server-side errors and events related to the Report Designer functionality to a specific file. The default value is false.
  4. Run the commands below to navigate to the created application's folder and download the client resources.

    cd ReportDesignerApp\ClientApp

    npm install


    Install Node.js and npm if they do not exist on your machine.

  5. Use the following commands to restore dependencies, build the application, and get the application's URL:

    cd ..

    dotnet restore

    dotnet run

  6. Open your browser and insert the generated URL to see the result.