[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Expand]Detailed Guide to DevExpress Reporting
 [Expand]Visual Studio Report Designer
 [Collapse]Create End-User Reporting Applications
   Cross-Platform Reporting
  [Expand]WinForms Reporting
  [Collapse]WPF Reporting
   [Expand]Print
   [Expand]Document Preview
   [Collapse]End-User Report Designer
    [Expand]Quick Start
    [Collapse]GUI
     [Expand]Interface Elements
      Document Preview
     [Expand]Report Wizard
     [Collapse]Data Source Wizard
      [Collapse]Connect to a Database
        Select a Data Connection
        Specify a Connection String
        Save the Connection String
        Create a Query or Select a Stored Procedure
        Create a Query or Select a Stored Procedure (Obsolete)
        Configure Query Parameters
      [Expand]Connect to an Entity Framework Data Source
      [Expand]Connect to an Object Data Source
      [Expand]Connect to an Excel Data Source
      [Expand]Connect to a JSON Data Source
      [Expand]Connect to an XPO Data Source
      [Expand]Connect to a Federated Data Source
       No Data
    [Expand]API and Customization
   [Expand]Application Security
   [Expand]Application Appearance
    Application Deployment
   [Expand]Localization
    End-User Documentation
  [Expand]Web Reporting
  [Expand]WCF Report Service
  [Expand]Discontinued Platforms
   Localization
   Redistribution and Deployment
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Create a Query or Select a Stored Procedure

On this wizard page, you can choose which tables, views and/or stored procedures from your data source to display in the report.

Expanded Manage Custom Queries

When you need to shape the query data at data source level, you can create custom queries by expanding the Queries category and clicking the button. This invokes the Query Builder where you can create complex queries by joining multiple tables, filtering, sorting and grouping their data, as well as calculating various aggregate functions.

You can also use the Query Builder to specify custom SQL. See Data Access Security to learn more about using this option.

Click the button to customize an existing query using the Query Builder.

Click the button to delete a query.

On finishing the wizard, each selected data item is included in a separate query.

Expanded Specify Master-Detail Relationships

Click Manage Relations to define master-detail relationships between two or more queries. In the invoked Master-Detail Relation Editor, you can create a new relationship by connecting the required key fields using drag and drop.

To edit an existing relationship, double-click the corresponding arrow, or right-click it and select Edit Relation in the context menu. This invokes the Edit Relations editor that provides a different UI to manage the data relationships.

On finishing the wizard, the provided data relationships appear in the Field List.

Click Next to proceed to the next wizard page. You go to the Configure Query Parameters page if selected queries or stored procedures contain any parameters.

Otherwise, clicking Next opens the Choose Fields to Display in a Report page.

Is this topic helpful?​​​​​​​