12. Report-Writer Statements : Column and Block Statements : .Format Statement—Set Default Printing Format
 
Share this page                  
.Format Statement—Set Default Printing Format
The .format statement sets up a default printing format for a column or set of columns.
This statement has the following format:
.format | .fmt columnname{, columnname} (format)
    {, columnname{, columnname} (format)}
The parameters for the .format statement are as follows:
columnname
The name of a column in the report. You can specify the column name as a delimited identifier by enclosing it in double quotes ("), if you have previously specified the .delimid statement.
The columnname can be expressed as a variable. The comma (,) and the parentheses ( ) must be stated explicitly and cannot be part of the columnname or format variable.
format
A valid printing format, as described in Format Specifications. The format must be the correct type for the column(s).
The format can be expressed as a variable. The comma (,) and the parentheses ( ) must be stated explicitly and cannot be part of the columnname or format variable.
$columnvariable
Variable whose value is a name of a column. Precede the variable with a dollar sign ($).
$formatvariable
The variable whose value is a name of a printing format described in Format Specifications. The format must evaluate to the correct type for the columns. Precede the variable with a dollar sign ($).