
Like a form, report, or menu, a DQL Procedure is a type of DataEase document. A procedure contains many of the same elements as other documents, including the Body, Page Header and Footer, and Summary Header and Footer, that control the appearance of a procedure's printed output. However, a DQL Procedure contains two additional elements that do not appear in a form or report: a script and a Data-entry form. The script appears in the DQL Script Editor window.
This section briefly describes how the various parts of a DQL Procedure fit together.
To open the procedure in Designer View, click once on the MEMBER LIST procedure name in the Catalog, then click on the Designer View button on the Toolbar. DataEase displays the procedure.
A script is a set of DQL instructions that DataEase executes when you open a procedure document. A script can ask a question about data in one or more tables, list or manipulate that data, or chain together any number of separate data management operations.
The figure below shows the script for the MEMBER LIST procedure. If you are viewing the MEMBER LIST procedure and the Script Editor is not currently displayed in the active window, choose View - Procedure to activate the Script Editor.
The script above tells DataEase:
Find all records in the MEMBERS table for members who live in California.
List the MEMBER ID, LAST NAME, and FIRST NAME for each selected MEMBERS record.
For each MEMBERS record, find all related FAMILY MEMBERS records and list the FIRST NAME and DATE OF BIRTH values from each of those records.
The output generated by this script appears below.
When you define a script that generates output, the output is printed in the body of the document. You can create a layout for the body to determine how that output appears when printed.
Creating a layout for a DQL Procedure is just like creating a report layout: you can use DataEase's automatic layout options or you can define a custom layout.
To view a layout on screen, open the procedure in Designer View, then choose View>>Body. The figure below shows the layout for the MEMBER LIST procedure.
DataEase also lets you create a DQL Procedure that does not generate any output. For example, you can create a procedure that simply deletes outdated records, performs an import, backs up the application, or transfers data from one table to another. When you run that procedure, DataEase displays it as a blank screen until the procedure is executed.
You can enhance the printed output of a DQL Procedure by creating Page Header or Page Footer. Page Headers and Footers appear on each printed page and can contain text, graphics, a page number, the current date, and other useful information.
To view a document Page Header or Page Footer on screen, choose View>>Page Header or View>>Page Footer.
To create a Page Header or Page Footer for a DQL Procedure, follow the same steps used to create Page Header or Page Footer for a form or report: choose View>>Page Header, then create the text objects, images, lines, variables, and any other objects you want to include.
See DG 6 for information on creating Summary Variables.
You can enhance the printed output of a DQL Procedure by creating a Summary Header or Summary Footer. Summary Headers and Footers appear on each printed page between the Page Header and Footer and the body of the document, and can contain text, graphics, a page number, the current date, and other useful information.
To view a document Summary Header or Summary Footer on screen, choose View>>Summary Header or View>>Summary Footer.
To create a Summary Header or Summary Footer for a DQL Procedure, follow the same steps used to create Page Header or Page Footer for a form or report: choose View>>Summary Header, ( then create the text, images, lines, variables, and any other objects you want to include).
The Difference Between Summary and Page Headers and Footers
If the output of a procedure or report is too wide to fit onto a single page, it is tiled across the width of several pages.
Pages Headers and Footers appear at the top and bottom of every tiled page.
Summary Headers and Footers appear once for every Âvertical page, that is, they do not repeat on every tiled page.à
A Data-entry form is a special form that appears at the start of a DQL Procedure. A Data-entry form lets you specify selection criteria and other information used by the procedure before processing begins. For example, a Data-entry form can appear at the beginning of a mailing label printing procedure to let you specify a particular group of customers for whom to print labels.
As originally designed, the MEMBER LIST procedure can list records from only one state, California. By adding a Data-entry form like the one shown in the figure below, you can make the procedure flexible enough to list records for any state.
When you use a Data-entry form, you must usually modify the DQL script so DataEase recognizes the input from the Data-entry form. The illustration on the next page shows how the MEMBER LIST script can be modified to work with a Data-entry form.
See DQL 2 for information on creating a Data-entry form.
The figure below shows the original MEMBER LIST script (above) and the modified version for use with a Data-entry form (below). The modified version tells DataEase to use the selection criterion specified in the Data-entry form instead of a "hard coded" value (e.g., STATE ="CA").
DataEase can automatically redisplay a Data-entry form after you run a DQL Procedure, so you can run that procedure repeatedly, processing a different set of records each time the procedure is executed. The data-entry form appears before the Print dialog, so you could also use it to first print to the screen, then to a printer.
Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17
Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11
Product: . Written by Marco Marchesi 15/02/16 at 14:50:46
Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44
Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10
Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40