Starts in:
2 DAYS
5 HRS
22 MIN
20 SEC
Starts in:
2 D
5 H
22 M
20 S
Open Closed

Telerik Reporing Integration #7269


User avatar
0
n.uerkmez created
  • ABP Framework version: v8.1.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I want to integrate the Telerik reporting tool into the ABP project. But in order to use the Rest API required in the Telerik Reportviwer in the Controller section, the Controller must be inherited from ReportsControllerBase instead of AbpController. Such as public class ReportsController : ReportsControllerBase

Therefore It cannot be inherited ReportsController from a second AbpController class at the same time.(C# does not support multiple inheritance)

How can I overcome this issue?

Attached are the errors I get when I call this controller.

Telerik sample


13 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Could you share the full error logs?

  • User Avatar
    1
    n.uerkmez created

    **This is the logs. ** 2024-05-31 09:31:32.966 +02:00 [ERR] Property 'JsonResult.SerializerSettings' must be an instance of type 'System.Text.Json.JsonSerializerOptions'. System.InvalidOperationException: Property 'JsonResult.SerializerSettings' must be an instance of type 'System.Text.Json.JsonSerializerOptions'. at Microsoft.AspNetCore.Mvc.Infrastructure.SystemTextJsonResultExecutor.GetSerializerOptions(JsonResult result) at Microsoft.AspNetCore.Mvc.Infrastructure.SystemTextJsonResultExecutor.ExecuteAsync(ActionContext context, JsonResult result) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.Claims.AbpDynamicClaimsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)

  • User Avatar
    1
    n.uerkmez created

    Additionally, For Telerik reporting it is necessary to derive a Controler from ReportsControllerBase instead of AbpController.And the following settings are required. https://docs.telerik.com/reporting/embedding-reports/host-the-report-engine-remotely/asp.net-core-web-api-implementation/host-reports-service-in-.net-5#setup-the-startupcs-file-for-the-reports-service

    Is there any way to use it in the ABP project?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Property 'JsonResult.SerializerSettings' must be an instance of type 'System.Text.Json.JsonSerializerOptions'.

    See:

    • https://docs.telerik.com/reporting/knowledge-base/jsonresult-serializersettings-must-be-an-instance-of-type-systemtextjson-jsonserializeroptions
    • https://docs.abp.io/en/abp/latest/JSON#newtonsoft
  • User Avatar
    0
    n.uerkmez created

    I have another question regarding Telerik Reporting Installation. https://docs.telerik.com/reporting/embedding-reports/host-the-report-engine-remotely/asp.net-core-web-api-implementation/host-reports-service-in-.net-5

    Following the installation steps given in the link above; in a ABP Solution(TelerikReporting), which project is more relevant to adding Telerik reporting dependencies (NuGet packages)? TelerikReporting.Application project or TelerikReporting.HttpAPI.Host project? Thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You should add the package to the TelerikReporting.HttpAPI.Host

  • User Avatar
    0
    n.uerkmez created

    It seems I have some issues in the Telerik reporting with Azure with Linux web app service. How can I add brand new Host Project to the existing Solution and align it with Auth server scopes?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can make a copy of an existing Host Project, rename it, and then add it to the solution.

    Update OpenIddictDataSeedContributor to add a new scope.

    Update ConfigureAuthentication to change the Audience to scope value

  • User Avatar
    0
    n.uerkmez created

    Thanks I will try it out. Then let you know

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    ok

  • User Avatar
    0
    n.uerkmez created

    I want to use [Authorize(XXXPermissions.Reports.Default)] in the custom controller which in the XXXX.HttpApi.Host project. However It can get User or any other info. Even if admin authenticated and has the permission, _authorizationService.IsGrantedAnyAsync(ImmoProvPermissions.Reports.Default).Result is always false. How can I get Authorization info in this point?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You need to add the access_token to the request header.

  • User Avatar
    0
    n.uerkmez created

    Thanks. How can I get existing access_token from abp angular project via any out of box abp service ?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06