ASP.NET Core Reporting
- 4 minutes to read
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:
- Install .Net Core 2.1 SDK or later.
Install Visual Studio 2017 v15.7 or later with the following workloads:
- ASP.NET and web development
- .NET Core cross-platform development
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:
- Create an ASP.NET Core Application with a Report Designer
- Create an ASP.NET Core Angular Application with a Report Designer
- Create an ASP.NET Core Application with the Document Viewer
- Create an ASP.NET Core Angular Application with the Document Viewer
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.
- Deserialization from CodeDOM format is not supported in .NET Core applications.
- The Visual Studio Report Designer does not display a preview for the reports whose data source is based on the Entity Framework.
- The ImageExportOptions.Resolution property does not work in Linux- and Mac-based environments.
- Linux- and Mac-based environments can not embed fonts in exported PDF files.
- Report inheritance is not supported.
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:
Open your ASP.NET application in Visual Studio and invoke the Report Designer for a report.
Click the report’s smart tag and select Save….
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
Open your ASP.NET Core application in Visual Studio and use the Add | Existing Item… command to add the saved REPX file.
Double-click the added REPX file. While the Report Designer invokes, the report’s Code Behind files are added to the project.
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
Open your ASP.NET Core application in Visual Studio and invoke the Report Designer for the existing report.
Click the report’s smart tag and select Open/Import….
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.