Control Character Format Q0
The q0 (q zero) format allows you to print a character string without the string taking up any actual space in the report. Report-Writer treats the string as if it had a length of zero. This format is designed to allow the printing of control character sequences within a report, although it can be used for other purposes. A typical use for the q0 format in a report might be to send an initialization sequence to an output device to change fonts or write bar codes.
The syntax of the q0 format is:
q0
where:
0
(Required) Permits any string length to be printed in this format. The parameter assumes a control sequence or a non-printable string is being specified.
Any printable character or hexadecimal string can be printed with this format. You must specify non-printable characters, such as TAB, SPACE, LF, FF, CR, and ASCII NUL (X'00'), as hexadecimal strings in the format, X|x'
nn{
nn}'. The q0 format sends the string directly to the output device as is, without interpretation. Hexadecimal strings in .print statements
without the q0 format are interpreted by the formatting routines and can produce undesirable results or cause Report-Writer to fail. For more information, see
Hexadecimal Strings (see page
Hexadecimal Strings).
Important! Sending a report with a q0 character string to a device other than the one intended can halt your output device. For example, if your report uses q0 to highlight specific characters on your screen, your printer halts because it does not understand the initialization string.
Also, if you are sending a report with a q0 format to the screen, place positioning commands (such as .tab or .right) on a separate line from the q0 format and its string. For example:
.tab 14
.println $start_hilite (q0), 'This is
hi- lighted', $end_hilite (q0)
or
.println $start_hilite (q0)
Placing positioning commands between the Q0 format and its string can produce incorrect positioning of the string output.
The following example initializes the printer to use a special font. The initialization sequence has been previously assigned to the variable start_font. After Report-Writer prints the string, the variable end_font resets the printer back to the original font.
.print $start_font (q0)
.print 'This will be printed in a different font.'
.print $end_font (q0)