Skip to main content
A newer version of this page is available.
All docs
V17.2

Lesson 1 - Create a Simple Data-Aware Report

  • 3 minutes to read

This tutorial describes how to create a simple data-bound report in Microsoft® Visual Studio® using the Report Wizard:

Tip

Open an existing reporting application or create a new one from scratch to get started with this tutorial. See Adding a Report to Your .NET Application to learn how to create a reporting application on the platform of your choice.

  1. Select PROJECT | Add New Item… in Visual Studio’s main menu or press CTRL+SHIFT+A.

    add-new-item-windows-forms

  2. In the Add New Item dialog, select the DevExpress v17.2 Report Wizard item and click Add.

    add-a-new-report-winforms-report-wizard

  3. In the invoked Report Wizard, select Data-bound Report and click Next.

    xtrareport-wizard-databaound-report-01

    Note

    Refer to the following documents to learn about other report types:

  4. On the next wizard page, you can select a data source type. Choose Database and click Next to proceed.

    report-wizard-select-data-source-type

    Note

    See the following documents to learn about binding to other data source types:

  5. 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.

    report-wizard-page-visual-studio-database-02a

    Select the first option and click Next to create a new connection.

  6. 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.

    report-wizard-database-sql-server

    Click Next to proceed to the next wizard page.

  7. On the following page, specify whether to save the connection string to the application’s configuration file.

    report-wizard-save-connection-string

    If you choose to save the connection string, specify its name and click Next.

  8. 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.

    get-started-simple-report-wizard-select-table

  9. 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.

    get-started-simple-report-wizard-select-fields

    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:

    get-started-simple-report-wizard-result-layout

Switch to the Preview tab to view the resulting report.

get-started-simple-report-wizard-result-report

See Also