View on GitHub

dotnet-eud

.NET Controls End-User Documentation

Query Builder

The Query Builder can be invoked from the SQL Data Source Wizard. It provides a visual editor to create custom queries and enables you to solve a variety of tasks.

Select Tables

To include a specific table into a query result set, drag and drop it onto the Query Builder design surface.

web-designer-query-builder-select-table-drag-and-drop

The Query Builder provides a toolbar with the following commands.

Icon Description
web-designer-query-builder-button-delete Removes the selected table or view from the query.
web-designer-query-builder-button-undo Reverses the most recent action.
web-designer-query-builder-button-redo Performs the action that has previously been undone.

For each table or view that has been added, you can select which specific columns to include into the query result set by using the corresponding check boxes.

web-designer-query-builder-select-fields

Join Tables

To join separate tables and/or views, connect their corresponding columns (key fields) using drag and drop. The connected columns must have identical data types.

web-designer-query-builder-join-tables

Clicking the data relation will display the corresponding properties that define the join type (Inner or Left Outer) and applied logical operator.

web-designer-query-builder-join-tables-selection-properties

A left outer join returns all the values from an inner join along with all values in the “left” table that do not match to the “right” table, including rows with NULL (empty) values in the key field.

When the left outer join is selected, the relationship line displays an arrow pointing at the “right” table of the join clause.

web-designer-query-builder-join-tables-left-outer

After executing the query, it will return a “flat” table composed of data records selected based on the specified join options.

[!NOTE] Although joining different tables within a single query may be required in some scenarios, creating hierarchical data sources generally results in better performance (in general, master-detail reports are generated faster than similar-looking reports created by grouping “flat” data sources).

Filter Data

Clicking the Query Builder surface will display the query options.

web-designer-query-builder-selection-properties

The following options are available.

Shape Data

Clicking a data column of a selected table or view will display the data column options.

web-designer-query-builder-shape-data

The following options are available.

Preview Results

You can test a query at any time on a limited subset of the actual data by clicking the Preview Results button.

This will open the Data Preview screen displaying the query result set limited by the first 100 data records.

web-designer-query-builder-data-preview