Using Suppressions to Vary Data Presentation
This example shows how to alter the controls in the previous example (Combining Field Processing and an Electronic Overlay) in order to generate a second report along with the one already created.
First, change the page definition by adding a SUPPRESSION subcommand to the third field in the repeated PRINTLINE—the PRINTLINE that mapped the models and sales figures in Combining Field Processing and an Electronic Overlay. The suppression is, in effect, created by the SUPPRESSION subcommand in the FIELD command. The following example shows the addition at line 23.
18 FIELD START 1 LENGTH 7 ; 19 FIELD START 10 LENGTH 3 20 POSITION 1.5 IN * ; 21 FIELD START 16 LENGTH 3 22 POSITION 2.5 IN * 23 SUPPRESSION SALES ; /*ADDED LINE */ 24 FIELD START 21 LENGTH 3 25 POSITION 3.5 IN * ;
The SUPPRESSION subcommand creates the potential for selective suppression of the data in the $(000)
field of the report.
Then, rewrite the form definition, creating two subgroups within the copy group. Next, write a SUPPRESSION command immediately after the FORMDEF command. Finally, place a SUPPRESSION subcommand in the subgroup in which you want the data suppressed. This names the suppression. The resulting form definition command stream is as follows:
FORMDEF SECRPT ; SUPPRESSION SALES ; /*NAMING THE SUPPRESSION */ COPYGROUP SECRPT ; OVERLAY SLSRPT ; /*NAMING THE OVERLAY */ SUBGROUP COPIES 1 OVERLAY SLSRPT ; SUBGROUP COPIES 1 OVERLAY SLSRPT SUPPRESSION SALES ; /*TURNING ON THE SUPPRESSION */
The result is shown in Figure Selective Suppression. The second subgroup creates the second output page of the same data with a second set of modifications; in this case, modifications means a suppression that is not in the first subgroup.
Selective Suppression
Review the steps in this example. To suppress a field, identify the field as suppressible in the page definition under the FIELD command in question. Then create a subgroup, activating this suppression with a SUPPRESSION subcommand in the form definition.
The first subgroup produces an output identical to the report in Combining Field Processing and an Electronic Overlay. It contains no suppression.