You can group the records in a report into ranges by adding the following phrase to a sort phrase. The sort field must be numeric. The keyword TOP is optional.
IN-GROUPS-OF value [TOP value]
In an IN-GROUPS-OF phrase, the first value defines the ranges within which the records will be grouped. The optional word TOP sets an upper limit within which all records with greater values than that amount are grouped.
For example, suppose you want a count of the number of employees who have taken classes, grouped for every twenty hours spent in the classroom. The number of hours of classroom time is stored in the field ED_HRS.
Issue the following request:
TABLE FILE EMPLOYEE COUNT EMP_ID BY ED_HRS IN-GROUPS-OF 20 END
Run the request. The output is:
The report shows that four (4) employees have fewer than 20 hours of classroom time, while one (1) has taken 60 hours or more.
WebFOCUS | |
Feedback |