Back to Devexpress

Query Builder

xtrareports-117591-web-reporting-end-user-report-designer-for-web-interface-elements-query-builder.md

latest4.1 KB
Original Source

Query Builder

  • Aug 18, 2023
  • 5 minutes to read

The Query Builder is a visual query editor. You can invoke it from the Data Source Wizard.

Select Tables

Drag and drop a table or view onto the Query Builder design surface to include it into a query result set.

The Query Builder provides a toolbar with the following commands:

IconDescription
Removes the selected table or view from the query.
Reverses the most recent action.
Performs the previously undone action.

Enable check boxes for the table columns you want to include into the query result set.

Use the search box to find a table or view:

Join Tables

The Query Builder allows you to join tables and/or views. Use drag and drop to connect corresponding columns (key fields). The connected columns should have identical data types.

Click the data relation to display the Relation Properties section. Properties in this section define the join type ( Inner or Left Outer ) and applied logical operator.

If you click OK to close the Qury Builder, the query is saved as a SQL string:

The executed query returns a “flat” table which joins different tables within a single query. The specified join options define which data records compose the query result set.

Note

We recommend you to use hierarchical data sources because the reporting engine generates master-detail reports faster than similar-looking reports which obtains data from “flat” data sources.

Filter Data

Expand the Query Properties section to display the query options.

The query provides the following options:

  • Name

  • Filter

  • Group Filter

  • Select All (*)

  • Select Top

  • Offset

  • Select distinct

Shape Data

Select a table or view and click a data column to display the data column options.

The Column Properties section contains the following options:

  • Name

  • Type

  • Alias

  • Output

  • Sort Type

  • Sort Order

  • Group By

  • Aggregate

Use Query Parameters

Use the Parameters section to add, remove and edit query parameters.

Each query parameter provides the following properties:

  • Name

  • Type

  • Result Type

  • Value

Preview Results

Click the Preview Results button to test a query on the actual data’s limited subset at any time.

The opened Data Preview screen displays the first 100 data records of the query result set.

See Also

Custom SQL Editor