CREATE-TABLE

Function

Creates a table from a template.

Syntax

NAME=table_name_var|_lit|_col
USING=table_template_var|_lit|_col
[COLUMN-COUNT=number_of_columns_var|_lit|_col]
[COLUMN-ATTRIBUTES=({column—number},{keyword1},{value1}, ..., {keywordn},{valuen})]
[ROW-ATTRIBUTES=({keyword1},{value1}, ..., {keywordn},{valuen})]
[TABLE-ATTRIBUTES=({keyword1},{value1}, ...,{keywordn},{valuen})]

Arguments

NAME

Table name used by ALTER-TABLE, DUMP-TABLE, FILL-TABLE, and PRINT-TABLE. Valid values include alphanumeric characters(A-Z, 0–9), underscore (_), and dash (-).

USING

Name of the table template. The template must be defined with DECLARE-TABLE. NONE indicates that the table is defined solely by CREATE-TABLE parameters.

COLUMN-COUNT

Number of table columns.

COLUMN-ATTRIBUTES

Attributes to apply to column cells. The values defined are only applicable when USING=NONE.

Table 17. Column Attributes

AttributeDescription
BACKGROUNDBackground color name or RGB triplet. Default=NONE.
BOLDYES | NO
CENTERYES | NO
DEFAULTWhen the USING argument is anything other than NONE, this attribute causes all the attributes to be set to default values prior to applying any other attributes.
FILL-COLORFill color name or RGB triplet. Default=NONE
FONTFont number. (Must be defined.)
FOREGROUNDForeground color name or RGB triplet. Default=BLACK.
ITALICYES | NO
LEADINGExpressed in decipoints
LINE-COLORColor name or RGB triplet of column line (line after column). Default=NONE (no line).
LINE-STYLEColumn line style (SOLID, SQUARE-DOT, DASH, DASH-DOT, LONG-DASH, LONG-DASH-DOT,LONG-DASH-DOT-DOT). Default=SOLID.
LINE-THICKNESSColumn line thickness expressed in decipoints. Default=two decipoints.
POINT-SIZEPoint size of the font. (Must be specified.)
UNDERLINEYES | NO
WIDTHWidth expressed in coordinate units. (Must be specified.)
WRAPYES | NO | maximum number of lines
WRAP-HEIGHTNumber of lines between each wrapped line. Default=one line.
WRAP-ONCharacters on which to force a WRAP. The default is not to force a WRAP.
WRAP-STRIPCharacters to change to a space before the WRAP is done. The default is not to strip any characters.

ROW-ATTRIBUTES

Attributes to apply to rows.

Table 18. Row Attributes

AttributeDescription
BORDER-COLORColor name or RGB triplet. Default=NONE (no border)
BORDER-LINE-STYLEThe border line style (SOLID, SQUARE-DOT, DASH, DASH-DOT, LONG-DASH, LONG-DASH-DOT, LONG-DASH-DOT-DOT). Default=SOLID
BORDER-THICKNESSBorder thickness expressed in decipoints. Default=two decipoints
DEFAULTWhen the USING argument is anything other than NONE, this attribute causes all the attributesto be set to default values prior to applying any other attributes.
FILL-COLORFill color name or RGB triplet. Default=NONE
HEIGHTNumber of lines between each printed row. Default=one line
LINE-COLORColor name or RGB triplet. Default=NONE (no line)
LINE-STYLEThe line style (SOLID, SQUARE-DOT, DASH, DASH-DOT, LONG-DASH, LONG-DASH-DOT,LONG-DASH-DOT-DOT). Default=SOLID
LINE-THICKNESSLine thickness expressed in decipoints. Default=two decipoints

TABLE-ATTRIBUTES

Attributes for the appearance of the table.

Table 19. Table Attributes

AttributeDescription
BORDER-COLORColor name or RGB triplet. Default=NONE (no border)
BORDER-LINE-STYLEThe border line style (SOLID, SQUARE-DOT, DASH, DASH-DOT, LONG-DASH, LONG-DASH-DOT, LONG-DASH-DOT-DOT). Default=SOLID
BORDER-THICKNESSBorder thickness expressed in decipoints. Default=two decipoints
DEFAULTWhen the USING argument is anything other than NONE, this attribute causes all the attributesto be set to default values prior to applying any other attributes.
FILL-COLORFill color name or RGB triplet. Default=NONE
LEADINGExpressed in decipoints. Default=0 decipoints

Description

Use CREATE-TABLE in any section except BEGIN-SETUP, BEGIN-SQL, and BEGIN-DOCUMENT to create a table from a template.

Example

create-table
    name='tab2'
    using='template4'
    column-count=4
    table-attributes=('border-thickness',&int4 'leading',&int2,
       'border-color',(&red),'border-line-style','square-dot')
    row-attributes=('fill-color',(230,240,255))
    column-attributes=(0,'italic',&yes,'bold',&yes,
       'center',&no,'font',&int3,'point-size',&int10,
       'foreground','white','background',(&blue), 'width', &int25)
    column-attributes=(1,default,'background',('red'),
       'foreground',('blue'))

See Also

ALTER-TABLE, DECLARE-TABLE, DUMP-TABLE, FILL-TABLE, PRINT-TABLE