Kbase 18758: How-To: Dynamically set COLUMN-LABEL (Option)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/19/1999 |
|
How-To: Dynamically set COLUMN-LABEL (Option)
Title: How-To: Dynamically set COLUMN-LABEL (Option)
Summary: This Kbase applies to the Version 8.3A Column-Label
option. This is to properly document the fact that the Column-Label
option is not an attribute of a field or variable but an option of
the format phrase. And to describe ways that this can be
dynamically set in a DEFINE, DISPLAY or UPDATE statement.
Step by step details:
/* Using the Define Statement */
DEFINE VARIABLE v_text AS CHARACTER FORMAT "x(12)"
COLUMN-LABEL "Progress!Software"
INITIAL "Incorporated".
DISPLAY v_text WITH DOWN.
/* Using the Display Statement */
DEFINE VARIABLE v_text AS CHARACTER FORMAT "x(12)"
INITIAL "Incorporated".
DISPLAY v_text COLUMN-LABEL "Progress!Software" WITH DOWN.
/* Using the Update Statement (Same as Display) */
DEFINE VARIABLE v_text AS CHARACTER FORMAT "x(12)"
INITIAL "Incorporated".
UPDATE v_text COLUMN-LABEL "Progress!Software" WITH DOWN.
Further to this you may set the Label "Attribute" and if no
Column-Label is defined, the Label will be displayed at the Column
Label. The advantage most people find with this option is that this
can be set from a Field or Variable value. The drawbacks are that
you cannot stack labels with this attribute, and the field or
variable must be defined in a frame and displayed with that frame
for this to work. The following code demonstrates this:
/* Assigning Label from a Variable */
DEFINE VARIABLE v_text AS CHARACTER FORMAT "x(12)"
INITIAL "Software".
DEFINE VARIABLE v_label AS CHARACTER FORMAT "x(12)"
INITIAL "Progress".
DEFINE FRAME dwn_frm v_text WITH DOWN.
ASSIGN v_text:LABEL = v_label.
DISPLAY v_text WITH FRAME dwn_frm.
Progress Software Technical Support Note # 18758