Reporting JsonDataSource - Parameters and Expression Bindings (v20.1)

Reporting Team Blog
08 May 2020

Our next major update (v20.1) includes multiple enhancements to our JSON Data Source and its wizard. In this post, I’ll describe how you can use these new features for your next desktop (WinForms, WPF) or web app (ASP.NET, MVC, ASP.NET Core).

Data Source Parameters

The Json Data Source Wizard now offers a way to construct the request URI by using a path parameter. A path parameter appends a path element to a JSON endpoint’s Uri.

As you can see in the screenshot below, we redesigned the start wizard page for the Web Service Endpoint option. Once you select it, you can configure URI path parameters and query parameters simultaneously:

Json Data Source - Wizard

A query parameter specifies the HTTP request parameter that is passed to a JSON endpoint. Generally, these parameters are used to filter data:

Json Data Source Wizard - Query Parameters

Path parameters and query parameters are included in endpoint requests in the same order as they are added and listed. You can move a parameter up or down the list to change its position in endpoint requests.

We also added a Resulting URI read-only field at the bottom of this wizard page so you can view and validate the generated URI:

Json Data Source Wizard - Resulting URI

Expression Bindings and Report Parameters

You can enable the new parameter’s Expression property and use expressions to set path, query, and header parameter values. Once you’ve done this, select the Expression Editor from the Value property’s drop-down list and specify the expression in the Expression Editor:

Json Data Source Wizard - Expressions

All available JSON Data Source parameter types can now be bound to report parameters. Select new report parameter from the Value property’s drop-down list, configure the report parameter in the Add New Parameter dialog, and click OK.

Json Data Source Wizard - Parameter Bindings

We always recommend filtering a report’s data at the data source level to speed the document generation process and reduce application workload. Binding data source parameters to report parameters will give you and your users this ability while using JSON Data Source.

We also recorded a short tutorial demonstrating these features in action, so please visit our YouTube channel to see how it works.

You can download the video’s script using the following URL: JSON Data Source Wizard – Parameter Expressions Video Script.

As always, we welcome any feedback. Feel free to post comments below and let us know what we can do to extend this feature in the future.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.