ASP.NET Core Reporting

Topics in this section describe how to create reporting applications in ASP.NET Core.

Prerequisites

DevExpress Reporting has the following prerequisites in ASP.NET Core applications:

Add a Report to an ASP.NET Core Application

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 and edit it in the Visual Studio Report Designer.

Add DevExpress Reporting Controls to an ASP.NET Core Application

The following tutorials describe how to add the Report Designer and Document Viewer to an ASP.NET Core application:

Create an ASP.NET Core Reporting Application Using a Project Template

The following tutorials describe how to use the DevExpress Template Gallery and .NET Core command line interface (CLI) to create an ASP.NET Core reporting application:

Customize the Reporting Controls in an ASP.NET Core Application

Docker Support

Refer to the Visual Studio Tools for Docker with ASP.NET Core tutorial for instructions on how to dockerize (add to a Docker container) your DevExpress Reporting ASP.NET Core application.

Make the following changes to the docker file configuration when you add the application to a Linux container:

 ...
 FROM microsoft/aspnetcore:2.1 AS base
 RUN apt-get update
 RUN apt-get install -y libgdiplus libc6-dev
 ...

Limitations

  • The XRRichText control is not available.
  • The ObjectDataSource component cannot obtain the data source schema from referenced assemblies (only directly from the solution's projects).
  • Linux-based environments cannot generate 3D Charts that use the OpenGL library.
  • Report Scripts are not supported.
  • The CodeDom serialization functionality supported only for manipulation with report controls in your code.
  • The Visual Studio Report Designer does not display a preview for the reports whose data source is based on the Entity Framework.

Move Reports from .NET Applications to .NET Core Applications

You can add the reports you designed in an ASP.NET application to an ASP.NET Core application.

Do the following to save an ASP.NET application's reports:

  1. Open your ASP.NET application in Visual Studio and invoke the Report Designer for a report.

  2. Click the report's smart tag and select Save....

    save-report-defintion-visual-studio-design-time

    This allows you to save the report's definition in XML format as a REPX file. Refer to the Save Report Layouts topic for details.

Use one of the following techniques to add the saved report to an ASP.NET Core application:

  • Add the saved report definition to your ASP.NET Core application

    1. Open your ASP.NET Core application in Visual Studio and use the Add | Existing Item... command to add the saved REPX file.

    2. Double-click the added REPX file. While the Report Designer invokes, the report's Code Behind files are added to the project.

      Add-Existing-Reports-To-Core-Apps

      Note

      The report's REPX file is added as an embedded resource. Reports with another value of the Build Action property cannot be loaded at runtime.

  • Load the saved report definition into an existing report (for example, create an empty report) in your ASP.NET Core application

    1. Open your ASP.NET Core application in Visual Studio and invoke the Report Designer for the existing report.

    2. Click the report's smart tag and select Open/Import....

      open-import-report-visual-studio-design-time

      The Load Report Layouts topic details this operation.

Important

Copy the report's Code Behind from the CS file in the ASP.NET application to the corresponding CS file in the ASP.NET Core application manually.

Now you can customize the added report in the same manner as you do it in an ASP.NET application.