Most report requests can be generated using a single verb, but it's possible to use up to 16 verbs and their associated sort conditions. Multiple verbs (also known as display commands) can be used to summarize several levels of data, or to display summary data and detail data in one report. The rules for using multiple verbs are:
-
Aggregate verbs (SUM or COUNT) must be used before detail verbs (PRINT or LIST).
-
If more than 2 verbs are used, only the last verb may be a detail verb.
-
The first verb phrase does not require a sort condition.
-
When a sort phrase is used with a verb phrase, any subsequent verb phrases must use the same sorting condition in the same order.
-
WHERE and IF conditions apply to the records selected for the report as a whole.
Example 1
The sample report below uses 3 instances of the verb SUM to calculate multiple levels of salary detail. The first verb phrase SUM AC:SALARY does not require a sort condition and calculates the total amount of salaries; the second verb phrase SUM AC:SALARY BY AC:UNIT calculates the total amounts of current salaries in each reporting unit; the second verb phrase SUM AC:SALARY BY AC:UNIT BY AC:WNAME calculates the total amounts of current salaries for each employee in each reporting unit. Note that for the last verb phrase, the sort phrase BY AC:UNIT must be repeated before the sort phrase BY AC:WNAME is used.
Report Request:
| Report Generated: |
EX AC TABLE FILE AC
SUM AC:SALARY
SUM AC:SALARY BY AC:UNIT
SUM AC:SALARY BY AC:UNIT BY AC:WNAME END | AC:SALARY UNT AC:SALARY AC:WNAME AC:SALARY --------- --- --------- -------- --------- $29,522.00 100 $19,756.00 CAMEL, SUE $14,417.00 DOG, JAN $5,339.00 200 $9,766.00 BEAR, BOB $4,570.00 HIPPO, JIM $5,196.00 |
Example 2
The sample report below uses 2 verbs to provide summary and detail information on employee positions. The first verb phrase COUNT AC:POSIT16 has an associated sort phrase BY AC:UNIT and provides the total number of positions by individual reporting units. The second verb phrase, PRINT AC:SSA AC:WNAME AC:POSIT16 provides detailed information on the employees and their position number and must repeat the sort phrase BY AC: UNIT used for the first verb phrase. Note that PRINT must be used as the last verb phrase because it is a detail verb.
Report Request:
| Report Generated: |
EX AC TABLE FILE AC
COUNT AC:POSIT16
BY AC:UNIT
PRINT AC:SSA AC:WNAME AC:POSIT16 BY AC:UNIT END | AC:POSITION UNT COUNT AC:WNAME AC:POSIT16
--- ----------- --------- ---------- 100 3 CAMEL, SUE 999-100-0820-000 CAMEL, SUE 999-100-1619-000 DOG, JAN 999-100-3300-000 200 2 BEAR, BOB 999-200-2358-000 HIPPO, JIM 999-200-0400-000
|
Last Updated: February 27, 2024