xtrareports-2554-feature-guide-to-devexpress-reports-bind-reports-to-data-sql-database-bind-a-report-to-a-database.md
This tutorial demonstrates how to bind a report to a hierarchical data source at design time in Visual Studio and specify a master-detail relationship between SQL Data Source queries.
Do the following to accomplish this task:
Click the report’s smart tag. In the invoked actions list, expand the Data Source property’s drop-down list and click Add Report Data Source.
On the first page of the invoked Data Source Wizard, select Microsoft SQL Server and click Next to proceed.
Choose whether to create a new data connection or use an existing connection from the Visual Studio Server Explorer. Select the first option to create a new connection and click Next.
On the next page, specify the connection properties.
Click Next on the following page to save the newly created connection string to the configuration file.
On the next page, choose tables, views, or stored procedures to add to the report.
The newly created SQL Data Source is listed under the Report Explorer‘s Data Sources node. The data source hierarchy is shown in the Field List. In both panels, you can right-click the data source to access its settings.
See Also