Queries

Top  Previous  Next

 

Queries are text script forms, which are used to extract data from tables and making them available in the report generator. Queries is that they get data from database tables and create them on the basis of a temporary table. The data in the temporary table will be filtered, grouped, sorted and ordered, according to the query parameters. Then, the temporary table is passed to the report generator. Applying queries provides the ability to avoid duplication of data in tables and provides maximum flexibility for searching and displaying data in a database. Most of queries are used to fetch data from the database and transfer them to the report generator. Not all data source types support SQL queries. If the type of a data source supports SQL queries, the New Data Source dialog will display the Text Query with the query. The picture below shows a New Data Source dialog, where in the Query Text field a query for fetching is created.

 

 

As can be seen from the picture above the CategoryName column of the Categories data source, and the columns ProductName, UnitPrice, UnitsInStock from the Products data source will be selected. The relation between data sources is organized by the key data column CategoryID. In order to get the data column, click the Retrieve Columns button after building the query. In addition, before a query you can change the type of the data source. The following types are available: Stored Procedure and Table. A stored procedure is an object of the database that consists of a set of SQL-instructions that is compiled once and stored on the server. To run the query, click the Run button.

 

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)