Data binding is a technique that establishes a connection between a report and the displayed data, starting with the addition of a data source and one or more data sets.
To create a data source, click the icon in the Data Sources area of the report's properties. It provides a choice of 2 templates:
The fabric_api data source is defined as the /api/ Fabric endpoint that runs under your Fabric's host. This is a default data source to be used for any Fabric API (built-in or custom).
The custom data source is an empty template that allows to define any required endpoint, by setting the following properties:
Endpoint - either a full-path or a base URL of your REST API to which the endpoint paths are appended by using data sets (described later on in this article).
HTTP Headers - a collection of HTTP Header fields that are passed with the request.
Query Parameters - a collection of name/value pairs that define the Query String of the URL.
Each data source may contain one or more data sets. To create a data set, click the icon near the data source name in the Data Sources area of the report's properties. It provides a choice of several Fabric endpoint templates and a custom data set definition.
Data Set Based on Fabric Endpoints
The Fabric endpoints include the following templates:
lu/{luName}/{@iid}/{table}
Fabric endpoint.lu/Customer/{@iid}
Fabric endpoint.common/{table}
Fabric endpoint.fabric-command
Fabric endpoint.Once selecting one of the above templates, a New Data Set window opens with a pre-defined Uri/path and Parameters that correspond to the selected template, as per the following logic:
{luName}
of the Fabric endpoint is pre-populated with the name of Logical Unit under which the report is created. {table}
is pre-populated with the TABLE_NAME constant and should be updated to the required LU Table name. iid
, which hasn't yet been defined for this report. Click here to learn how to define a new parameter or follow the steps of this user guide until you reach the Parameters Creation guidelines, where it elaborates about defining parameters.It is recommended to update the default data set name to a meaningful and a suitable name, for example below it is updated to ACTIVITY:
There is a quick way to set up data binding with Fabric built-in endpoints. Click here to get more details on how to do it.
Custom Data Set Definition
The custom data set allows to define any required endpoint, by setting the following properties:
$.*
or $[*]
JSONPath expression to specify the repeated data fragments.Note: The templates for data source and data set creation are available for new reports only. When adding a data source or a data set to an existing report, New Data Source and New Data Set windows will open, requiring a manual population of all details.
For completion of its creation, a Data Set must be validated. The validation is done in order to check that everything is defined correctly and to retrieve the fields list.
Click on the Validate button (bottom left corner of New Data Set window) to validate the data set. Note that prior to the validation, the number of fields is 0.
When the Uri/path includes a parameter, you will be prompted to insert the parameter value:
Populate a valid parameter value and click Save & Run to run the validation.
If the validation succeeded, the fields are populated in the Database Fields section. You can click the icon in the Database Fields section to expand the list of fields in order to view them.
If the configuration is invalid or if there are other issues relating to data connection, the dialog box displays an error message at the top area of the Data Set window.
The fields can be updated as follows:
The default names of the Database Fields can be updated.
You can specify the field's data type, which is useful mostly for tagging Date fields because, in JSON data format, dates are usually represented by strings. Add [Date] tag to the Date fields to tag a field and then set the format using the cell properties.
In addition to Database Fields, you can define Calculated Fields to be added to the data set by using an expression.
Click on the Save Changes button to finalize the Data Set definition.
The below example demonstrates how to define a data source and a data set using Fabric endpoint templates:
Proceed to the next step of this user guide to define the report's parameters.
Click for more details about data binding options in ActiveReportsJS.
Data binding is a technique that establishes a connection between a report and the displayed data, starting with the addition of a data source and one or more data sets.
To create a data source, click the icon in the Data Sources area of the report's properties. It provides a choice of 2 templates:
The fabric_api data source is defined as the /api/ Fabric endpoint that runs under your Fabric's host. This is a default data source to be used for any Fabric API (built-in or custom).
The custom data source is an empty template that allows to define any required endpoint, by setting the following properties:
Endpoint - either a full-path or a base URL of your REST API to which the endpoint paths are appended by using data sets (described later on in this article).
HTTP Headers - a collection of HTTP Header fields that are passed with the request.
Query Parameters - a collection of name/value pairs that define the Query String of the URL.
Each data source may contain one or more data sets. To create a data set, click the icon near the data source name in the Data Sources area of the report's properties. It provides a choice of several Fabric endpoint templates and a custom data set definition.
Data Set Based on Fabric Endpoints
The Fabric endpoints include the following templates:
lu/{luName}/{@iid}/{table}
Fabric endpoint.lu/Customer/{@iid}
Fabric endpoint.common/{table}
Fabric endpoint.fabric-command
Fabric endpoint.Once selecting one of the above templates, a New Data Set window opens with a pre-defined Uri/path and Parameters that correspond to the selected template, as per the following logic:
{luName}
of the Fabric endpoint is pre-populated with the name of Logical Unit under which the report is created. {table}
is pre-populated with the TABLE_NAME constant and should be updated to the required LU Table name. iid
, which hasn't yet been defined for this report. Click here to learn how to define a new parameter or follow the steps of this user guide until you reach the Parameters Creation guidelines, where it elaborates about defining parameters.It is recommended to update the default data set name to a meaningful and a suitable name, for example below it is updated to ACTIVITY:
There is a quick way to set up data binding with Fabric built-in endpoints. Click here to get more details on how to do it.
Custom Data Set Definition
The custom data set allows to define any required endpoint, by setting the following properties:
$.*
or $[*]
JSONPath expression to specify the repeated data fragments.Note: The templates for data source and data set creation are available for new reports only. When adding a data source or a data set to an existing report, New Data Source and New Data Set windows will open, requiring a manual population of all details.
For completion of its creation, a Data Set must be validated. The validation is done in order to check that everything is defined correctly and to retrieve the fields list.
Click on the Validate button (bottom left corner of New Data Set window) to validate the data set. Note that prior to the validation, the number of fields is 0.
When the Uri/path includes a parameter, you will be prompted to insert the parameter value:
Populate a valid parameter value and click Save & Run to run the validation.
If the validation succeeded, the fields are populated in the Database Fields section. You can click the icon in the Database Fields section to expand the list of fields in order to view them.
If the configuration is invalid or if there are other issues relating to data connection, the dialog box displays an error message at the top area of the Data Set window.
The fields can be updated as follows:
The default names of the Database Fields can be updated.
You can specify the field's data type, which is useful mostly for tagging Date fields because, in JSON data format, dates are usually represented by strings. Add [Date] tag to the Date fields to tag a field and then set the format using the cell properties.
In addition to Database Fields, you can define Calculated Fields to be added to the data set by using an expression.
Click on the Save Changes button to finalize the Data Set definition.
The below example demonstrates how to define a data source and a data set using Fabric endpoint templates:
Proceed to the next step of this user guide to define the report's parameters.
Click for more details about data binding options in ActiveReportsJS.