Sample Request: Count Positions and List Employees

The report request below uses multiple verbs to obtain a count of positions in each reporting unit and also to print the names of the employees in each unit.  In effect, there are two levels of data, summary and detail, in a single report request.

 

The aggregate display command, COUNT, has the sort condition:  BY AC:UNIT.  Per the syntax rules for multiple verbs, that same sort condition must be used on the detail display command, PRINT.

 

Report Request:

 

EX AC

TABLE FILE AC

COUNT AC:POSITION

  BY AC:UNIT

PRINT AC:WNAME

  BY AC:UNIT

IF RECORDLIMIT EQ 10

END

 

Report Generated:

 

     AC:POSITION

UNT  COUNT         AC:WNAME

---  -----------   --------

111            4   ARDVARK, C DONALD

                   GIRAFFE, GARY G

                   YAK, SHEILA M

                   SEAL, RICHARD D

222            6   SNAKE, DAVID   L

                   ANT, SYLVIA  A

                   CAMEL, TOM N

                   SHARK, PATRICK B

                   GROUNDHOG, MARY L

                   HIPPOPOTAMUS, MICHAEL  A

 

See Also:  Using Multiple Verbs