Articles in this section

How to Enable Multiple Dataset Assignment in the Bold Reports Embedded Designer

Published:
Updated:

Enable enableTableMultipleDataAssign in the embedded Report Designer to assign fields from more than one dataset to table cells. This is useful when a report needs to present related values from separate data sources together without building a separate subreport. The table can display values from different datasets, but it does not join or align their rows automatically.

Step-by-Step Instructions

Step 1: Configure the Designer Property

Set enableTableMultipleDataAssign to true when initializing the Report Designer:

<script type="text/javascript">
    $(function () {
        $("#designer").boldReportDesigner({
            // Replace with your actual service URL
            serviceUrl: "https://demos.boldreports.com/services/api/ReportingAPI",
            // Enable the option for multiple dataset assignment
            enableTableMultipleDataAssign: true 
        });
    });
</script>
Property Name Description
enableTableMultipleDataAssign Enables the table report item to accept fields from multiple datasets when set to true.

Step 2: Assign Fields from Multiple Datasets

  1. Create or open a report that contains two or more datasets.

  2. Drag a Table report item onto the design surface.

  3. Drag a field from DataSet1 into the first column.

    DataSet1 Assignment

  4. Drag a field from DataSet2 into the second column.

    DataSet2 Assignment

  5. Drag a field from DataSet3 into the third column.

    DataSet3 Assignment

The table’s rows are driven by its assigned dataset; assigning a field from another dataset does not join that dataset’s rows to the table. To show a related value from another dataset, use an expression such as Lookup with matching key fields, or aggregate the secondary dataset as appropriate. For example:

=Lookup(Fields!DepartmentID.Value, Fields!ID.Value, Fields!Name.Value, "DataSet2")

This example looks up a matching department name in DataSet2. Replace the key fields, return field, and dataset name to match your data. See Combine Data from Multiple Datasets Using the Lookup Function for a step-by-step Lookup example.

The exact expression generated when a field from a secondary dataset is dragged into a table depends on the designer behavior. Inspect the cell expression and confirm it returns the intended value; do not assume rows from the datasets are automatically joined or aligned.

Download the sample application here.

Related Articles

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied