12. Report-Writer Statements : Column and Block Statements : .Format Statement—Set Default Printing Format : Description
 
Share this page                  
Description
The .format statement sets up a default format associated with a column to be used whenever Report-Writer prints the column or an aggregation of a column.
If you specify variables for the column and/or format, Report-Writer evaluates columnvariable and formatvariable during the loading of the report specification, before retrieving any report data.
Because the format for a column can determine the default width for that column (used in the .center, .right, and .left statements), you can use the .format statement to control the default width of a column. Report-Writer uses this statement to determine the default width only in the absence of the .width or .position statements, which also specify the default width for a column. You can use .tformat to override the format of a column during the run of the report.
If you do not specify a .format statement for a column, Report-Writer determines the print format by scanning the printing statements in the report. If the printing statements do not specify a format, Report-Writer determines the default.
By default, breaks use the formatted values for any column whose format has been specified in a .format statement. That is, a break occurs for such a column only when the formatted value changes. Otherwise, no break occurs, even if the unformatted value changes. To force Report-Writer to use the actual, rather than the formatted, values to determine breaks, specify the ‑t flag on the report Command—Run a Report.