12. Report-Writer Statements : Print Statements : .Print and .Println Statements—Print Text of Report
 
Share this page                  
.Print and .Println Statements—Print Text of Report
The .print and .println statements print literal text strings, columns from the database, or expressions on the report.
These statements have the following formats:
.print | .pr | .p expression[(format)]{, expression[(format)]}
.println | .prln | .pln expression[(format)]{, expression[(format)]}
The parameters for the .print statement are as follows:
expression
Any legal expression. For more information, see the chapter "Report-Writer Expressions and Formats." You can specify a column name in an expression as a delimited identifier by enclosing it in double quotes ("), if you have previously specified the .delimid statement.
format
An optional printing format for the expression, as described in Format Specifications. The format must be the correct type for the expression. If you do not specify a format, Report-Writer uses one of the default formats listed in the chapter "Report-Writer Expressions and Formats."
The format can be expressed as a variable ($formatvariable). The parentheses ( ) must be stated explicitly and cannot be part of the format variable. The comma (,) must be stated explicitly and cannot be part of the expression.
$formatvariable
Variable whose value is the name for a printing format described in Format Specifications. The format must evaluate to the correct type for the column(s). Precede the variable with a dollar sign ($). Report-Writer evaluates $formatvariables, but not expressions, at load time.