8 Answers, 1 is accepted
Hi Robert,
Basically, you can follow the steps given in How To: Use HTML5 Report Viewer in an ASP.NET Core 3+ application article. Note that due to some changes between .NET CORE 3 and .NET CORE 3.1, there is a little difference in step2 in Setting up the ConfigurationService in the Startup.cs file. The code has to look as follows:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
this.services.AddTransient(ctx => new Controllers.ReportsController(new ConfigurationService(env)));
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseRouting();
app.UseCors("MyPolicy");
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers().RequireCors("MyPolicy");
});
}
In the attached file you can find a sample project. Before starting the application you might need to run the Upgrade Wizard.
Regards,
Neli
Progress Telerik

I get the error as follow:
Cannot access the Reporting REST service. (serviceUrl = '../api/reports/'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)
Hello Vincent,
This error indicates that the Telerik Reporting REST Service is not working properly. Note that since R1 2020, we add dependency injection to the Web API controllers in .NET Core, so now the Reports Controller looks as follows:
[Route("api/reports")]
public class ReportsController : ReportsControllerBase
{
public ReportsController(IReportServiceConfiguration reportServiceConfiguration)
: base(reportServiceConfiguration)
{
}
protected override HttpStatusCode SendMailMessage(MailMessage mailMessage)
{
throw new System.NotImplementedException("This method should be implemented in order to send mail messages");
// using (var smtpClient = new SmtpClient("smtp01.mycompany.com", 25))
// {
// smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
// smtpClient.EnableSsl = false;
// smtpClient.Send(mailMessage);
// }
// return HttpStatusCode.OK;
}
}
Regards,
Neli
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Hi,
Do you have updated sample for the latest version and .NET Core 3.1? I've tried the attached sample above but it's not working and there are obsolete classes being use in the sample, even the the AspNetCoreDemo in the example folder is not working
Hi Susandi,
In R1 2020 we made some improvements and now you can use Dependency Injection and pass the configuration settings in the constructor of the ReportsController. To remove the warning, you can follow How to fix ReportsControllerBase is obsolete warning KB article.
Please, check the attached NET Core 3.1 project with the latest version of Telerik Reporting 14.1.20.618. Let us know if you need further help.
Regards,
Neli
Progress Telerik

Hi Susandi,
Can you give me more details about your environment while you are rendering the report in .NET Core? Note that for Linux or MacOS, we use libgdiplus which is not a perfect replacement for the Windows graphics library, the rendered reports may differ in terms of text positioning, word-wrapping and aligning.
You can also send me the generated PDF files of the report.
Regards,
Neli
Progress Telerik
