Reporting - Script Support for .NET Core Applications (v19.2)

Reporting Team Blog
14 November 2019

We want to do everything possible to simplify the migration process for those moving to .NET Core 3 and future .NET 5. In this post, we’ll discuss script support in v19.2 and ask for your feedback as we fine-tune our development plans for 2020.

Note: If you’re unfamiliar with DevExpress Reports and its script support, please review the Scripts Overview help topic for more information.

Scripting Thanks to Roslyn

The CSharpCodeProvider class from .NET Framework provides access to the code generator and code compiler. We’ve relied on it for years and as you may know, .NET Core still does not support it. Unfortunately, it does not look like any such support is planned for the future.

As we researched ways to introduce scripting support for .NET Core, we settled on the Microsoft.CodeAnalysis NuGet package because it gave us access Roslyn compiler facilities.

You can install this package into any application that targets .NET Core. In addition, you can leverage report script functionality regardless of the target operating system: be it is Windows, Linux or Mac.

How to Enable Report Scripts in .NET Core Apps

To get started and enable report scripts in your .NET Core app, you must:

  1. Install the Microsoft.CodeAnalysis NuGet package manually:

NuGet Package Manager - Microsoft.CodeAnalysis

  1. DevExpress Reporting does not have direct dependency on this package. You will receive the following error message upon generating a report with scripts if the package is not found:
Cannot execute report scripts because the application does not include required libraries.
  1. Enable script execution as described in the Script Execution Modes help topic.

You can now open the DevExpress Report Designer and navigate to the scripts tab to incorporate report scripts:

Visual Studio - Report Designer Script Editor

You can learn more about scripting in our Scripts Tab - Visual Studio Report Designer help topic.

Your Feedback Counts

This enhancement is the first step in our mission to improve scripting support for DevExpress Reporting. To help us direct R&D efforts in an appropriate direction, please take a moment to answer the following short survey:

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.