Bind a Report to a Data Source
- 2 minutes to read
Supported Data Sources
DevExpress Reporting allows you to bind reports to the following data sources:
- SQL Database
- XML File
- Entity Framework Data Source
- Object Data Source
- List Object
- Excel Data Source
- JSON Data Source
- XPO Data Source
- Standard .NET Data Providers
Specify a Data Source
You can create an unbound report and use the Data Source Wizard to connect the report to a data source when required. Expand the DataSource property editor and click Add Report Data Source to run the Data Source Wizard.
The Report Wizard and Data Source Wizard allow you to perform the following actions:
- Bind the report to popular data providers, including SQL, Entity Framework, Excel and object data sources;
- Use a UI to create master-detail relations between data tables and views;
- Invoke a Query Builder to shape report data.
Do not use dots in the data source name since the report engine uses them to separate the names of different data items (data source, table, relation, field, etc.)
Reuse a Report’s Data Source
You can reuse a report’s data source in other reports.
Add a data source to the Report Gallery.
Right-click a report’s data source in the Field List or Report Explorer and add it to the Report Gallery.
Assign an existing data source to a report.
Select a data source from the Components section in the Report Gallery and click Add to Report Components.
Bind a Report at Design Time and Load Data at Runtime
You can adjust a report’s layout and bind report controls to data fields at design time, but load actual data at runtime when the report is generated. Use one of the following approaches to accomplish this task for different data sources: