The main purpose of the Report Designer is to create and customize data-aware reports. This means that a report gets data from an external data source (many types of which are supported), to which the report is bound, and the report's controls represent the corresponding data fields from that data source.
To bind a report to data, execute the following steps.
- Create a new report.
-
To bind the report to data, click its Smart Tag. In the invoked actions list, expand the Data Sourcedrop-down list and click Add New DataSource.
-
A dialog appears allowing you to define a name for the dataset being created.
-
On the next page, specify the database to be used. If it is absent in the drop-down selector containing existing connections, click New Connection..., to invoke the Data Link Propertiesdialog.
In this dialog's Providertab, choose your data provider. Then, switch to the Connectiontab, to specify the path to your data source.
Click Ok, then Next.
-
The next page allows you to select tables to be obtained from the database. Select the required table and click Finish.
Note If you choose several tables, the Report Designer creates a data relationship between them (if possible), used to create the master-detail reports.
-
After performing the steps above, the report's Data Source, Data Memberand Data Adapterproperties are defined. This means that the report is bound to the data.
After binding a report to a dataset, you also need to bind each data-aware report controlto a data field. Please refer to the Display Values from a Database (Bind Report Elements to Data)topic for details.