Using the Query constructor

Top  Previous  Next

Let's create a simple report using the query builder.


Click “New report” _img310 on the designer toolbar to create a report page having “Report header”, “First level data” and “Page footer” bands.


Place an “ADO Query” component on the “Data” tab. Double-click on the component to open the query editor.




Click the clip0284 button in the query editor to open the query builder window. Select the Customer table in the list of tables (3) and drag it onto the workspace (alternatively double-click on the table). Select the CustNo, Company and Phone fields:




That is all that is required for query building. The query text appears on the SQL tab and the Result tab shows the data returned by the query. Click _img314 to close the builder and to return to the query editor, where the query text is now displayed:




Please Note! If the query text is altered in the query editor then the query diagram of tables and joins will be lost. Do not alter the query text manually, always open the query builder and modify the diagram visually.


Clicking _img314 in the query editor returns to the report designer. All that is left to do is to connect the “MasterData” band to the data source and place the required fields on the “MasterData” band.