Simplicty and flexibility!


Support::

Parts Of A DQL Procedure


Parameters


Returns/Result


Examples


Reference

Parts of a DQL Procedure

Parts of a DQL Procedure

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.

 

Script

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.

 

image\7dql1-24.gif

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.

image\7dqli-25.gif

 

Body of a Procedure

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.

 

image\dqli--26.gif

 

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.

 

Page Header and Page Footer

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.

 

image\7dql-27new.gif

 

image\7dql-27.gif

 

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.

 

Summary Header and Summary Footer

image\Dql_0003.gif

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.ࠀ

 

Data-Entry Form

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.

 

image\7dataentryform.gif

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.

 

image\Dql_0003.gif

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").

 

image\dqli-30.gif

 

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.

See Also


On the forum about Parts Of A DQL Procedure

[@EOF@]...

Product: . Written by alembagheri tahmas 07/12/13 at 13:37:32

Hi there,I am trying to use an external MySQL DB in dataease. I have successfully create the ODBC link and added the DB to dataease. I can also access the DB from dataease. Now, just for testing purposes, I am trying to create a simple report b...

Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17

no se pude exportar ahora archivos a pdf, ni a excel o otros cosa mala. en verdad creo que hace faltaen las versiones anteriores me funcionaba mas o menos bien. le hace falta a los aplicativos que se desarrollan en Dataeasegr...

Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11

Thanks. Anyway I'm trying to use this fuction but it seems to me that it doesn't work on 8.2. I tried also in a DQL.There's something wrong?<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA9IAAAJ3CAYAAAB4NWk3AAAAAXNSR0IArs4...

Product: . Written by Marco Marchesi 15/02/16 at 14:50:46

[@EOF@]...

Product: Dataease [{8}]FIVE. Written by Chamil Rajindra 21/02/19 at 10:17:46

Thanks for the very good explanation!AS...

Product: . Written by afonso santos 28/10/19 at 00:50:14

I am pleased to see that the migration from Dos 4.53 is then sa 5.5 works. A really useful thing would be a compiler of SQL languages. Will you get there?Original Text:Mi compiaccio a vedere che la migrazione da Dos 4.53 è poi sa 5.5 funzio...

Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44

How can i delete a Style sheet?...

Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10

I run W7 and since a few days&nbsp;Dataease 8.5 is not starting any more, do you have an idea? i installed it again but that did not help....

Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40

[@EOF@]...

Product: . Written by Hiralal Rampul 01/12/21 at 17:47:10

On the blog about Parts Of A DQL Procedure


dg3_HelpView