xtrareports-117591-web-reporting-end-user-report-designer-for-web-interface-elements-query-builder.md
The Query Builder is a visual query editor. You can invoke it from the Data Source Wizard.
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:
| Icon | Description |
|---|---|
| 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:
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.
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
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 the Parameters section to add, remove and edit query parameters.
Each query parameter provides the following properties:
Name
Type
Result Type
Value
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