12. Report-Writer Statements : Statement Syntax Summary
 
Share this page                  
Statement Syntax Summary
The following table provides a summary of Report-Writer statement syntax.
Statement Category
Accepts Variables or an Expression*
Default, If Not Specified
.block | .blk other formatting statements
.endblock | .endblk | .end block
No
None
.bottom | .bot
No
None
.break | brk columnname {, columnname}
No
None
.center | .cen | .ce [[+|-] n | columnname |expression]
Expression
Page center**
.cleanup SQL_statement; {SQL_statement;}
No
None
.data | .dat | .table | .view [schema.]
tablename | viewname | synonym
Variables
None
.declare variablename = datatype
   [with null | not null]
    [with prompt 'promptstring']
    [with value 'valuestring'] {, variablename = datatype...}
No
None
.delimid
No
Delimited identifiers not recognized
.detail | .det
No
None
.footer | .footing | .foot
   report | page | columnname
Variables
None
.format | .fmt columnname{, columnname}
    (format) {columnname{, columnname} (format)}
Variables
Determined by data type of column
.formfeeds | .ffs | .ff
.noformfeeds | .noffs | .noff
No
 
.if condition .then {statement}
   {.elseif condition .then {statement}}
    [.else {statement}]
.endif
No
None
.include filename
No
None
.left | .lft | .lt [[+ | -] n | columnname | expression]
 
Left margin**
.leftmargin | .lm [[+ | -] n | expression]
Expression
0
.let variablename [:] = expression
Expression
(right of the
equal sign)
None
.lineend | .lnend
No
None
.linestart | .lnstart | .linebegin
No
None
.longremark | .lrem remark_text
.
endremark | .endrem
No
None
.header | .heading | .head
   report | page | columnname
Variables
None
.name | .nam reportname
No
None
.need | .ne nlines | expression
Expression
None
.newline | .nl [nlines | expression]
Expression
1
.newpage | .np [[+ | -] pagenumber | expression]
Expression
Current page number + 1
.nullstring | .nullstr 'null_string' | expression
Expression
None
.output | .out filename
Variables
Screen
.pagelength | .pl {nlines | expression}
Expression
Files: 61 lines
Screens: screen length
.pagewidth | .pw width
Variables
Files: 132 characters
Screens: screen width
.position|.pos columnname{, columnname} position[, width])
   {, columnname{, columnname} (position[,width])}
Variables
None
.print | .pr | .p  expression [(format)]
   {, expression [(format)]
or
.println | .prln | .pln expression [(format)]
   {, expression [(format)]
Expression
(Formats can only take variables)
None
.query | .quer /* for SQL users * /
   select [all | distinct] column_list
    [as resultcolumn_list]
   from [schema.]table |view|synonym [corr_name]
        {, [schema.]table |view|synonym [corr_name]}
    [where search_condition]
    [group by column {, column}]
    [having search_condition]
        {union select ...}
    [order by ...]
Variables
None
.query | .quer /* for QUEL users * / {range_statement(s)}
   retrieve [unique] (target_list) [where qual]
    [sort by | order by ...] sort-list
Variables
None
.right | .rt [[+ | -] n | columnname | expression]
Expression
Right margin**
.rightmargin | .rm [[+ | -] n | expression]
Expression
100 or determined by detail statement
.setup SQL statement; {SQL statement;}
No
None
.shortremark | .srem remark-text
No
None
.sort | .srt {columnname[:sortorder]
   {, columnname[:sortorder]}}
Variables
None
.tab | .tb. | .t [[+ | - ] n | columnname | expression]
Expression
None
.tformat | .tfmt columnname{, columnname}
    (format) {, columnname{, columnname} (format)}
Variables
None
.top | .tp
No
None
.ulcharacter | .ulchar | .ulc 'c'|expression
Expression
Files: underscore (_)
Screens: hyphen (-)
.underline | .ul | .u any printing statements
.nounderline | .noul | .nou
No
No underline
.width | .wid columnname{, columnname} (width)
   {, columnname}{, columnname} (width)}
Variable
Determined by format
.within | .wi columnname{, columnname} | all
   other formatting statements
..endwithin | .endwi | .end within
Variable
None
*If an expression is used, it must evaluate to the type of object indicated in the statement; for example, a number or column name. Variable names must be preceded by a dollar sign ($) to evaluate them. Any punctuation must be explicitly stated and cannot be a part of the expression. Statements that take variables only (not expressions) are evaluated during the load of the report specifications, while those that take expressions are evaluated each time the statement is executed.
**The default value if the statement is specified with no parameter.