End Count
count the number of records and display the total (count) at the end of the report.
This example prints the Quiz reserved words from the quiz dictionary and the definition for each word. The total number of the name and definition fields will display at the end of the report.
The count word is entered as one of the arguments or modifiers after the field to be counted.
The arguments:
- size “60” — sets the column width to 60 characters
- wrap — if the field is greater than 60 characters, put the next 60 characters on the next line in the same column until all the data is printed.
- caption — optional label. Without the caption the count will be labeled by the name of the counted field.
The last page of the view looks like this:
There are 122 reserved words, with 120 unique definitions.
That brings up another consideration. count does not count exact duplicates of the field being counted. So even though there are 122 unique names, there are only 120 unique definitions.
You can also get a count on a field without printing the column:
Add the noprint reserved word as one of the arguments on name and the report will look like this:
The name field doesn’t print.
Page 1 — count
Page 2 — end count
Page 3 — count as column
Next – count as column >