Add DataSet in WPF ReportDesigner Control

2 Jun 20211 minute to read

Data set is a collection of data fields. You can add the data set to the corresponding data source in the Report Designer by using the following steps.

  1. In the Report Data, Click New, and then click the DataSet.

    Click the data set in WPF ReportDesigner

  2. Right click the added data source (Adventure) and click Add DataSet.

    Add new data source in WPF ReportDesigner

  3. Right click on the DataSets and click Add DataSet.

    Add data set while right-click of Datasets in WPF ReportDesigner

  4. In Data Set Properties wizard, enter a name for the data set in the Name field and to select the fields manually from the database, click the Query Designer.

    Displays Data Set Properties window of WPF ReportDesigner

  5. In Query Designer wizard,Click Edit as Text to manually write the query to retrieve fields from the database.

    Click Edit as Text button in Query Designer window of WPF ReportDesigner

  6. Choose the Query in the database view and select the corresponding fields in that query.

    Choose the query in database and fields in Query Designer Window of WPF ReportDesigner

  7. Test the query by clicking the Run Query.

    Test the query by clicking the Run Query button in WPF ReportDesigner

  8. Click OK.Then the added fields will display on the Query field in the Data Set Properties wizard.

    Query field added into the Data Set Properties window of WPF ReportDesigner

  9. Click OK.The added DataSet (Employee) and its fields are appear in the Report Data panel.

    Added data set for employee in WPF ReportDesigner