Transmit text to print file

Command group Flag affected Reversible Execute on client Platform(s)
Reports and Printing YES NO NO All

Syntax

Transmit text to print file ([Add newline]) {text}

Options

Add newline If specified, the command sends a newline character sequence after sending the text

Description

This command sends text to a print file, for example, you can send printer control characters. To transmit control characters, you can use the chr() function inside square brackets. For example, [chr(27,14)]sends escape 14.

The Add newline option causes Omnis to add end of line characters after each line of text.

An error occurs if no print file has been selected.

Example

# Create a file containing the text 'This is my report' together with the report rMyReport
Set print or export file name {[con(sys(115),'output.txt')]}
Transmit text to print file (Add newline) {This is my report}
Set report name rMyReport
Send to file
Print report
Close print or export file