Progress
Results User’s Guide
for UNIX
Determining the Order Criteria Defined
Use the following shared variable in your Progress procedures to determine the defined order criteria inside Results:
This shared variable has these characteristics:
- The shared variable
qbf-order
contains BY clauses.- Each element contains one of the order-by fields.
- Results sets each unused array entry to the empty string (
“”
) and places it at the end of the array so that no gaps appear inqbf-order
array.- Each element has the form “
database.file-name.field-name [ DESC]
.” In this case, an optional blank space and the lettersDESC
are included after the name to indicate that the order field is descending. If the field is an array field, the field name is followed by a number square brackets (for example,[#]
, where#
is the array element selected for ordering).- The values contained in the
qbf-order
variable are always database fields or calculated fields.- The following example is typical of the code that generates the order-by clause:
NOTE: This code is used in theu-export.p
sample export format program in the "Designing Your Own Export Format" section in this chapter.When you run this program, it outputs the appropriate ordering for the report, export, or label program that was defined in Results.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |