New to Telerik Reporting? Request free 30-day trial

Telerik Reporting Cannot Coexist with Telerik UI for ASP.NET Core

Environment

Product Progress® Telerik® Reporting

Description

I created a new Telerik ASP.NET Core MVC Application with a Telerik Grid and it worked as expected.

In the same project, I added a new Telerik HTML5 Report Viewer Page item and the needed Reporting REST Service with a sample report. The report was displayed successfully when I ran the project. However, when I went back to the Grid, it stopped working.

Solution

The issue is due to the Newtonsoft.Json package that is required by Telerik Reporting. By default, the Telerik UI for ASP.NET Core product uses alternative JSON serialization.

In order to use Newtonsoft.Json for the serialization in Telerik UI for ASP.NET Core, the following serializer settings must be set in the AddNewtonsoftJson constructor:

services.AddRazorPages().AddNewtonsoftJson(options => options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver());

For more information, you may have a look at the ASP.NET Core JSON Serialization - Telerik UI for ASP.NET Core article.

See Also

In this article