We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Local Report Rendering in 2.1 But Fails in 3.0

Downloaded and executed the following example solution provided in a previous thread:
ReportSample_core797180486.zip (Core 2.1)
After adding a local .rdl report, we were able to connect to a SQL database and render the report without issue.

Problem: Created a new project in asp.net Core 3.0 adding the same file structure and nuget packages. When the report (index) page loads in Core 3, the following error is shown in the report view:

Unable to cast object of type 'System.Text.Json.JsonElement' to type 'System.String'.

Any help would be greatly appreciated.
Note: using the trial package and files.

3 Replies

VS Vinoth Srinivasan Syncfusion Team October 16, 2019 01:53 AM

Hi Paul, 
In our ASP.NET Core Report Viewer application we are using Json.NET serializer for ReportService which has been removed from ASP.NET Core 3.0 shared framework. So, could you please use AddNewtonsoftJson() with services to works with Json.NET serializer as per the migration information in below link,   
1.      Add a package reference to Microsoft.AspNetCore.Mvc.NewtonsoftJson 
2.      Update Startup.ConfigureServices to call AddNewtonsoftJson 
public void ConfigureServices(IServiceCollection services)  
Vinoth S. 

BC Bevan Coaton October 16, 2019 10:36 AM

Thank you very much.  Worked like a charm.

MS Mahendran Shanmugam Syncfusion Team October 17, 2019 12:20 AM

Hi Paul,  

Thanks for your update. 

We are happy your issue was resolved. 

Mahendran S. 

Live Chat Icon For mobile
Up arrow icon