12. Report-Writer Statements : Column and Block Statements : .Format Statement--Set Default Printing Format : Examples
 
Share this page                  
Examples
1. This example shows a .format statement that declares formats for several columns, followed by a .print statement that uses the formats specified in the .format statement to print the information.
.format trans, balance ('$$$,$$$,$$$.nn')
.print trans,balance
.newline
2. This example shows a .format statement that declares formats for date columns where date_fmt evaluates to a date format and column names are delimited identifiers.
.format "trans date", "cur date" ($date_fmt)