The Report Radio Button

The report radio button is similar to the ACUCOBOL-GT standard radio button control. Like the ACUCOBOL-GT standard control, the report radio button can be assigned to a group and given a value within that group. The report radio button Property window contains the following control-specific properties in addition to the properties described in Common Report Control Properties.

Group

The Group property setting is included for user documentation purposes. Radio buttons in the same group should be handled together, so that the selection or deselection of report radio buttons is coordinated.

Value

This property must be set to 0 or 1. A value of 0 (the default) indicates that the report radio button is not selected in the report. A value of 1 indicates that the report radio button is selected in the report.

The report radio button is a stylistic display device. You need to code for the conditions that cause a particular radio button to be selected. A logical place to perform this check is in a Before-Print paragraph for a report radio button. The follow example shows one way to handle a group of radio buttons displaying credit card information:

INITIALIZE ws-credit.
EVALUATE card-type
   WHEN "M"
      MOVE 1 TO ws-mastercard
   WHEN "V"
      MOVE 1 TO ws-visa
   WHEN "A"
   MOVE 1 TO ws-amex
END-EVALUATE.

For another approach, refer to sample Report1d in the Reports sample project.

Value Picture

This property affects the picture clause of the generated value variable. It must be a numeric value. The default value for this property is X(1).

Value Variable

The Value cell for this property has an ellipsis push button that opens the Select Variable interface. If a variable is selected in this dialog box, subtle modifications to the generated code occur, such that it references the Value Variable instead of Value directly. This property has no default value.