Back to Devexpress

VCL Reports/Dashboards: How to Use Data Source and Data Set Components

vcl-405886-expresscrossplatformlibrary-vcl-backend-database-engines-vcl-backend-dataset-component-support.md

latest13.3 KB
Original Source

VCL Reports/Dashboards: How to Use Data Source and Data Set Components

  • Apr 06, 2026
  • 4 minutes to read

The VCL Backend implementation allows you to bind TdxDashboard/TdxDashboardControl and TdxReport components to one or multiple datasets (TdxMemData, TFDTable, TFDQuery, and other TDataSet descendants) like any other data-aware VCL control (TcxGrid, for instance). The dedicated TdxBackendDataSetJSONConnection component maintains a collection of associated datasets, serializes fetched data, and stores it in memory in the JSON format[1].

Follow the steps described in this topic to bind a TdxMemData component to TdxReport using TdxBackendDataSetJSONConnection and TDataSource components.

In this topic…

Sample Data File

This guide uses the following DAT file shipped with compiled DevExpress VCL Demos:

Tip

%PUBLIC$\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressQuantumGrid\Data\Employees.dat[2]

Download: Compiled VCL Demos

Create & Configure a RAD Studio App Project

Create a new project and place TdxReport and TdxBackendDataConnectionManager components on a form.

Double-click the TdxBackendDataConnectionManager component on the form to open the Collection Editor dialog, click the Add button, and select the DataSet (JSON) option to create a TdxBackendDataSetJSONConnection component:

Add & Populate a Memory-Based Dataset

Add TdxMemData and TDataSource components on a form.

Right-click the TdxMemData component and select the Persistent Editor… option. Click the Get Fields… button to display the Open File dialog.

Open the following file: %PUBLIC$\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressQuantumGrid\Data\Employees.dat.

The Persistent Editor displays empty dataset fields loaded from the specified file. Click the Load… button to display the Open File dialog.

Select the same Employees.dat file to populate created fields with data.

Click Ok to close the Persistent Editor dialog.

Bind Dataset JSON Connection and Memory-Based Dataset Components

Select the TDataSource component and associate it with the populated TdxMemData component using the Object Inspector:

Select the TdxMemData component and set the Active property to True:

Select the previously created TdxBackendDataSetJSONConnection component and click the ellipsis button for the TdxBackendDataSetJSONConnection.DataSets property to display the Collection Editor dialog.

Click the Add New button to create a dataset link (TdxBackendDataSetCollectionItem) for the TdxBackendDataSetJSONConnection component:

Select the created TdxBackendDataSetCollectionItem component and use the Object Inspector to assign the previously configured TDataSource component to the TdxBackendDataSetCollectionItem.DataSource property:

The TdxMemData component is now accessible to TdxDashboard/TdxDashboardControl and TdxReport components in the project.

Access Data Using the Report Designer

Double-click the TdxReport component to display the Report Designer dialog.

Click the hamburger button to display the Report Designer menu:

Click Add Data Source… to review fields loaded from the configured and populated TdxMemData component:

Click Finish to add selected fields to the FIELDS pane of the Report Designer dialog:

Drag & drop listed fields to the report template and use other layout configuration tools available in the Report Designer dialog.

Next Steps

Review the following tutorials to get started with TdxDashboardControl and TdxReport components:

Create a Dashboard Using the Designer DialogCreate a dashboard application: configure Bubble Map and Chart dashboard items, and bind them to data at design time.Create a Table Report Using the Report WizardCreate a simple report application: define a table report layout and bind it to data using the Report Wizard dialog at design time.

Other Supported Database Systems

Refer to the following topics for step-by-step instructions on using corresponding database systems for ExpressReports and ExpressDashboards:

Built-In Support

In-Memory/Remote Web ServiceThe TdxBackendInMemoryJSONConnection component allows you to bind TdxDashboard/TdxDashboardControl and TdxReport components to JSON data defined in code or loaded from a remote Web API service endpoint.SQLiteSQLite is a file-based relational database engine.Microsoft SQL/Azure DatabasesMicrosoft SQL Server and Azure SQL Database are proprietary relational database management systems developed by Microsoft.

Database Providers That Require Assembly Deployment

PostgreSQLPostgreSQL is an open-source database management system.Oracle DatabaseOracle Database is a proprietary multi-model database management system developed by the Oracle Corporation.MySQLMySQL is an open-source relational database management system developed by the Oracle Corporation.FirebirdFirebird is an open-source SQL relational database management system.

Footnotes

  1. You can use the TdxBackendDataSetJSONConnection.ConnectionString property to access serialized dataset content (as a string in the JSON format).

  2. You can use any other DAT file within the same folder.

See Also

VCL Reports/Dashboards: Supported Database Systems

VCL Reports/Dashboards App Deployment