

Adding Programming Logic to a Report › Using Counters › What You Can Do
What You Can Do
You can count occurrences, or the number of times an event happens during processing.
How to Do It
- Conditionally, by coding:
- A numeric work field:
010 COUNTER-A
- A computation that adds 1 to the value of the work field whenever counting should occur:
017100 COUNTER-A + 1 COUNTER-A
- Automatically, by coding:
- A numeric work field.
010 COUNTER-B
- A value you want assigned each time counting occurs. Typically, this value is 1:
010 COUNTER-B 1
- The name of the work field on a type 5 parameter:
0151*010 COUNTER-B (Prints the value each time)
or
0151*000 COUNTER-B (Does not print the value)
- The name of the work field on a type 6 parameter when the total count should be printed on the report.
0161*010 COUNTER-B
Type 6 parameters are coded the same way as type 5.
For more information see the chapter "Controlling Total Lines".
Copyright © 2014 CA.
All rights reserved.
 
|
|