Developments in ActiveReports ensure people can design and distribute reports from different domains. ActiveReports 14 includes .NET Core 3.1 support which gives access to reporting applications from different platforms.

Creating Desktop-Based .NET Core Reporting Apps

User Scenario: You’re tasked with creating a directory containing U.S. citizens’ phone numbers for distribution to government agencies. Government agencies will use this list to conduct phone surveys on public interests. This directory needs to be distributed to the government-based companies who would use the numbers to conduct surveys on general public health and interests. To meet this requirement, you had collected the contact numbers from multiple sources and placed them together in a JSON file.

To arrange the data like a phone book, you have created a report like below.


Before distributing the report, consider the following:

  1. Government officials from different companies use different Windows platforms, and a single distributable file should work for them all
  2. Companies are not required to have prerequisites
  3. Running the application at the end-users' site should require minimum effort

Creating a desktop-based .NET Core application covers all the above points. You can display the report using AR14 Viewer control and deploy the application in a self-contained mode.

Creation of .NET Core Application Using ActiveReports 14

Prerequisites

  1. Visual Studio 2019
  2. .NET Core 3.1

Create a Windows Form App (.NET Core) in Visual Studio 2019. Choose and install a package from the NuGet Package Manager

  1. For previewing reports: ‘GrapeCity.ActiveReports.Viewer.Win’
  2. For creating reports: ‘GrapeCity.ActiveReports.Win.Design’
  3. For exporting reports to different formats: ‘GrapeCity.ActiveReports.Export.*'

For this example, we chose ‘GrapeCity.ActiveReports.Viewer.Win’

Step 2. Add/Design a Report

Add the report rptTelephoneDirectory.rdlx in the project. Design a new or existing Page, RDL, or Section report.

Step 3. Add Viewer Control and Load Report

Add the following code in the code-view of Form1.cs:

GrapeCity.ActiveReports.Viewer.Win.Viewer _viewer = new GrapeCity.ActiveReports.Viewer.Win.Viewer();
_viewer.Dock=DockStyle.Fill;
_viewer.LoadDocument(Application.StartupPath + “rptTelephoneDirectory.rdlx”); 
this.Controls.Add(_viewer);

Run the application to view your report.

Note: Design-time operations in .NET Core WinForms and WPF applications are not yet supported.

Step 4. Deploy the Application

Deploy the application using dotnet command or Visual Studio.

dotnet publish –c Release –r win-x64 /p:PublishSingleFile=true /p:PublishTrimmed=true

The EXE generated in the publish folder can be distributed further to the end-users. Distribute the report along with the EXE, so it runs successfully.

In addition to desktop-based applications, web-based applications can also be created and distributed using ASP.NET Core. .NET Core offers users a number of features and works with many reporting applications.

Let us know how you’re using ActiveReports 14 with .NET Core 3.1 reporting.

Attachments:

Download Project | Get the file: rptTelephoneDirectory.rdlx

Try ActiveReports free for 30 days

Download the latest version of ActiveReports Professional

Download Now!