Skip to main content

Bind a Report to Multiple Data Sources

  • 3 minutes to read

You can bind the following report elements to data sources other than the report’s data source:

This topic demonstrates how to bind two DetailReport bands to different data sources.


See Bind a Report to Multiple Data Tables for information on how to bind a report to multiple non-related tables from the same data source.

To bind a report to different data sources, do the following:

  1. Create a new application or open an existing application. For more information, review the following help topic: Get Started with DevExpress Reporting.

  2. Add a new blank report to it.
  3. Add a DetailReport band to the report. Right-click the report’s Detail band and select Insert Detail Report / Unbound from the context menu.

    HowTo - BindReportToDifferentDataSources_0

  4. Bind the added band to a data source. Click the band’s smart tag, expand the Data Source drop-down list, and click Add Report Data Source

    HowTo - BindReportToDifferentDataSources_1

    The invoked Data Source Wizard guides you through the process of assigning the data source to the band. These steps are similar to the ones described in the following topic: Bind a Report to a Database.

  5. In this example, the DetailReport band is bound to the Employees table from the sample Northwind database (the nwind.mdb[1] file included in the XtraReports installation).

    When the steps above are performed, the DetailReport band’s DataSource property is set to sqlDataSource1. Set the band’s DataMember property to the dataset’s Employees table.

    HowTo - BindReportToDifferentDataSources_2

    The detail report is now bound to the data.

  6. Create another DetailReport band. Repeat the same steps as above to bind it to another data source (the Northwind database’s Suppliers table).


    You can bind the second DetailReport band to a different database.

  7. In this example, you do not need to show any data in the Detail band. Set the band’s Visible property to False to hide it.

  8. Drop data fields from the Field List onto the created bands.

    HowTo - BindReportToDifferentDataSources_3

The report is ready. Switch to the Preview tab and view the result.

HowTo - BindReportToDifferentDataSources_4

  1. If your project in Visual Studio 2022 has to connect to Microsoft Access databases, note that Visual Studio 2022 is a 64-bit process, and Microsoft OLE DB Provider for Jet and the Jet ODBC driver are only available in 32-bit versions. It is recommended that you use the 64-bit Microsoft Access Database Engine (Access Connectivity Engine, ACE), or use an earlier version of Visual Studio (VS 2019) that supports 32-bit database providers. For more information, review the following article: Connect to data in an Access database.