Back to Devexpress

Bind a Report to Multiple Data Tables

xtrareports-7002-feature-guide-to-devexpress-reports-bind-reports-to-data-bind-a-report-to-multiple-data-tables.md

latest3.7 KB
Original Source

Bind a Report to Multiple Data Tables

  • Feb 18, 2026
  • 3 minutes to read

This tutorial shows you step-by-step how to include data from two (or more) unrelated data tables in a single report. In this topic, the data tables are from the same data source. For information on how to bind a report to different data sources, review the following help topic: Bind a Report to Multiple Data Sources.

  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, as described in the following help topic: Create a Report in Visual Studio.

  3. Add a data source with two unrelated tables. You can use the Employees and Products tables from the sample Northwind database. For more information on how to add a data source to the report, review the following help topic: Bind a Report to a Database.

  4. Clear the DataSource and DataMember settings for the report. The settings should be assigned individually to the Detail Report bands, as described later.

  5. Add a new Detail Report band. To do this, right-click on the Detail report band and select Insert Detail Report | Unbound in the context menu:

  6. Specify the sqldataSource1 data source and Employees data member for the created DetailReport band:

  7. Add another new Detail Report band. To do this, right-click the Detail report band and select Insert Detail Report | Unbound in the context menu to create another DetailReportBand at the same level as the first Detail Report band.

  8. Specify the sqldataSource1 data source and Products data member for the second DetailReport band:

  9. To force a page break between different data sets in a report, set the Band.PageBreak property of the first DetailReportBand to AfterBand:

  10. Drag the FirstName and LastName fields from the Employees table in the Field List, and drop them onto the first Detail Report band:

  11. Drag the ProductName field from the Products table in the Field List and drop it onto the first Detail Report band:

  12. Switch to the Preview tab and view the result.

When you create a reporting application, you might need to modify or configure data sources for your reports at runtime. Refer to the following topic for more information: Manage Data Sources at Runtime.

See Also

Create a Side-by-Side Report

Create a Multi-Column Report in the Visual Studio Report Designer

Merge Reports