Base solution for your next web application
Open Closed

DevExpress Report Designer with JSON Data Source (Need POST Support for Parameters) #12528


User avatar
0
pliaspzero created

Hello Support Team,

we are using ASP.NET Zero v13.4.0 with Angular UI and an ASP.NET Core 8 backend (ABP framework + EF Core).

We would like to switch our reporting to DevExpress. The necessary database queries and data preparation are handled in the backend.

We use DevExpress Report Designer (WinForms, via the DevExpress Demo Centre) to design the reports, and our plan was to configure a JSON data source that connects to our backend web service endpoints.

Currently, these endpoints are accessible via HTTP GET, but we need to pass parameters to the reports. Some of these parameters can be long (complex filters, lists, etc.), and from a security perspective we prefer not to send them in the query string. Instead, we would like to send them via HTTP POST with a request body.

Unfortunately, the JSON Data Source Designer from DevExpress only supports GET requests during configuration.

Question: Is there a recommended way in ASP.NET Zero / ABP to configure DevExpress reports so that parameters can be passed securely via POST requests instead of GET?

Thank you very much in advance!

Best regards, Oliver

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @pliaspzero

    You are correct that the DevExpress Report Designer’s JSON Data Source wizard (the one you see in WinForms) only supports configuring the endpoint via HTTP GET. This is a DevExpress limitation rather than something specific to ASP.NET Zero.

    From the ASP.NET Zero side, there are generally two approaches you can use

    Use GET only at design time, switch to POST at runtime

    • In DevExpress, after the JSON Data Source has been created with GET, you can programmatically modify the JsonDataSource.ConnectionName - JsonSource to use custom code for fetching data (via UriJsonSource or CustomJsonSource).
    • At runtime, you can override this and call your ASP.NET Zero application service endpoint with HTTP POST and pass the report parameters securely in the request body.
      • Designer connect with a simplified GET endpoint just for schema discovery.
      • Runtime (in your ASP.NET Core backend) supply the real data by POST.

    Expose an application service specifically for reports

    • In ASP.NET Zero you can create an AppService like ReportDataAppService that accepts a DTO as input ([HttpPost]) and returns the data object your report expects.
    • The report definition does not have to call the endpoint directly instead, you can bind the data source programmatically before showing exporting the report in your Angular or server side code.
    • This gives you full control over security, parameter passing, and avoids query string length issues.

    Custom JSON Data Source – DevExpress Document

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)