<< Click to Display Table of Contents >> Navigation: User Interface Reference > Dashboard Designer > Working with Data > Query Builder |
Dashboard for Desktop > Dashboard Designer > Working with Data > Query Builder
In the Query Builder dialog, you can add data tables and views to the data source, and select which columns to include. The Query Builder automatically joins the related tables, so all you need to do is drag-and-drop.
To add the required tables/views to a data source, double-click the table (or view), or drag-and-drop it from the Tables pane onto the Diagram pane.
Then, select the required columns.
Note that if at least one table has been added to the Diagram pane, the Tables pane highlights tables that have a relationship with any of the recently added tables.
To join the already added table with a another table, drag and drop the required table from Tables pane to Diagram pane. As an alternative, in a row corresponding to a foreign key column, click the button (SupplierID or CategoryID columns in the example below).
You can also manually join tables that do not have a relationship at the database level. To do this, drag the required table from the Tables pane to the Diagram pane. This invokes the Join Editor dialog.
First, check the join type. You can specify it in the Join type combo box. An Inner join and Left outer join are supported.
To edit column and table names in the existing condition, click the name you wish to replace and choose a different name from the popup menu.
You can add new conditions and remove existing conditions using the and
buttons, respectively.
After you have added the tables and selected the required columns, you can change settings for each column in the Grid pane.
The following settings are available for each column.
•Use Column to select the required column from the combo box or add a new column.
•The Table column displays corresponding table names.
•The Alias column allows you to specify the column alias.
Note
Note that aggregated columns should always have an alias.
•The Output column allows you to choose whether to include specific columns to the query.
•Use the Sorting type combo box to specify the sort order of column values. The Sort order column allows you to specify the order in which several columns are sorted.
•The Group By statement is used in conjunction with the aggregate functions to group the result-set by one or more columns.
•The Aggregate option allows you to specify the aggregate function used to aggregate column values.
Note
Note that you should apply aggregation/grouping either to all columns or to none of them.
To filter data in the Query Builder, click the Filter... button. This will invoke the Filter Editor dialog, which allows you to build filter criteria.
To learn more, see Filter Queries.
Copyright (c) 1998-2016 Developer Express Inc. All rights reserved.
Send Feedback on this topic to DevExpress.