Using a New CODES File

  1. In Developer, create a report.

  2. Add a label to the report frame in Painter.

  3. Add the output control code RED, to the ControlCodes property of the label.

  4. You can then use the output control code of RED, as shown in the following example:

    DATA; CREDITAMT ED; $ LE; 9 DE;2
    Give it a direction of "Out"
    Use the painter to add a control code of "RED" to it.

    For automatic printing, the logic of the report must define Glb.Device and Glb.Stn, as shown:

    MOVE "TP" Glb.Device
    MOVE "PBP989-ALIAS" Glb.Stn
  5. Generate and run the report. Output of this frame prints the value of CREDITAMT in red on your printer named PBP989 .

Note: You also need an output control code (for example, BLACK) to set the printer back to its normal color.