ASP.NET Core Reporting - CLI Templates

Reporting Team Blog
03 August 2018

Way back in April 2018, we announced .NET Core support for our excellent Reporting suite. I ended that blog post with our future intentions:

Our long-term vision is to provide a completely consistent set of features regardless of the platform you choose for reporting. Therefore, we're going to constantly improve the .NET Core support in the context of the next release cycle. -Blog

I'm happy to announce a set of command line interface (CLI) templates to create DevExpress Reports for the .NET Core platform!

Quick Refresher

The .NET Core CLI allows you to create new projects directly from the console.

We're introducing a set of CLI templates that you can use to create starter cross-platform projects with DevExpress Reporting suite.

This means that you can create .NET Core projects with DevExpress Reporting on your MacOS, Linux, or Windows consoles!

1. Use the Console

Use the .NET Core CLI to create an ASP.NET Core Reporting application from the console.

Get started by installing the DevExpress CLI templates. 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. Get Your NuGet Key

.NET Core projects rely on NuGet packages and you'll need access to the DevExpress NuGet packages. We offer a Nuget portal for our customers.

We're providing a personal NuGet URL for every registered DevExpress customer login. So if you haven't generated your personal URL yet then click on the 'Obtain Your NuGet Feed URL' button on the DevExpress NuGet portal.

This URL includes your personal feed authorization key and is used to install NuGet packages that the Document Viewer requires.

Please take a look at this blog post for more context.

3. Create New Project

Use the command below to create a new project with the Document Viewer. Pass the the NuGet Feed URL obtained above as a parameter.

dotnet new dx.reporting --nuget-feed{YourDevExpressNugetKey}/api --name DocumentViewerApp --add-designer false

Replace {YourDevExpressNugetKey} with your personal NuGet key you obtain from step two.

DevExpress Reporting templates provide 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 that enables your end-users to create and customize reports. The default value is true.
  • -av | --add-viewer - Specifies whether to create a web page with the Document Viewer that allows you to preview, print, and export reports. 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 configuration file. The default value is false.
  • -ul | --use-logger - Specifies whether to log server-side errors and events related to the Document Viewer functionality to a specific file. The default value is false.

4. Download Other Resources

Run the commands below to navigate to the created application's folder and download all the necessary client resources.

cd DocumentViewerApp
bower install

If Bower is not installed on your machine then please follow the instructions here: Bower: A package manager for the web.

5. Restore Dependencies

Use the following commands to restore dependencies, build the application and get the application URL:

dotnet restore
dotnet run

6. View in Browser

Open your browser and insert the generated URL to see the result:

With a few steps, you've created a cross-platform .NET Core project with DevExpress Reports!


We'd love to hear your feedback about the .NET Core support from DevExpress Reporting Suite. Please leave a comment below, thanks.


Twitter: @mehulharry

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.