Create a Simple Data-Aware Report
- 3 minutes to read
In the previous step, you created a sample application and added a report item to it. This step describes how to use the Report Wizard to create a data-bound report in Microsoft® Visual Studio.
Tip
The created reports are platform-agnostic. You can reuse these reports in applications created for different platforms.
Select PROJECT | Add New Item… in Visual Studio’s main menu or press CTRL+SHIFT+A.
In the Add New Item dialog, select the DevExpress v19.1 Report item and click Add.
In the invoked Report Wizard, select Table Report and click Next.
Note
Refer to the following documents to learn about other report types:
On the next wizard page, you can select a data source type. Choose Database and click Next to proceed.
Note
See the following documents to learn about binding to other data source types:
On the next wizard page, specify whether you want to use an existing data connection from Visual Studio’s Server Explorer, or create a new one from scratch.
Select the first option and click Next to create a new connection.
On the next page, you can define a custom connection string, or select one from the list of supported data providers.
Depending on the data provider, it may be necessary to specify additional connection options (such as authentication type and database name) on this page.
For this example, bind a report to the sample Northwind database hosted on a Microsoft SQL Server.
Click Next to proceed to the next wizard page.
On the following page, specify whether to save the connection string to the application’s configuration file.
If you choose to save the connection string, specify its name and click Next.
On the next page, you can choose which tables, views and/or stored procedures to add to the report.
Select the Products data table and click Next.
On the following wizard page, select a report’s data member on the left-hand side and choose which fields to display in this report from the list on the right-hand side.
You can click Next to proceed to the next wizard page and continue report customization.
For this tutorial, stop the wizard at this step by clicking Finish to get the following report layout:
Switch to the Preview tab to view the resulting report.
Next Step: First Look at the Report Designer