12. Report-Writer Statements : Print Statements : .Print and .Println Statements--Print Text of Report : Description
Share this page                  
The .print statement specifies text to be included in the body of the report. Text can be character strings printed directly, data items from the data table, variables, aggregates, or a combination of these. Report-Writer includes the text at the place in the report where it encounters the .print statement. By preceding the .print statement with the positioning statements such as .newline, .tab, .center, .right, or .left, you can specify the location of the text. By default, Report-Writer includes the text immediately after the last text output with the .print statement.
Report-Writer evaluates any print expressions that are used as parameters to the .print statement during runtime. You can include as many expressions as you want in the .print statement; Report-Writer adds them to the report in the order specified.
If the expression is a runtime variable for a column name (for example, .print $account_type), Report-Writer prints the name of the column as entered at runtime, rather than its data. To print the data rather than the column name, you use the select column_list as resultcolumn_list construct in the query and reference the resultcolumn_list name in the .print statement. For more information, see the .Query statement.
If you use the optional .println form of the statement, the current print position advances to the next line after the specified text is printed.
Data that formats into a single logical line can wrap to yield a default maximum of 310 physical lines as protection against omitted explicit .newline and/or .newpage statements. You can override this limit by specifying the ‑wmxwap parameter in the report command.
Important!   Embedding tabs in a string can truncate the string if it is printed with a default format or with a format that is not large enough to allow the tab to be expanded into spaces. To print string sthat contain tabs, use a specified format wide enough for the expanded tab(s).