Description

The ENABLERTF message is used to enable printing RTF codes in text, tables, headers, and footers. When ENABLERTF is enabled the report will print slower. All of the text must be surrounded by curly brackets {}. This feature allows you to customize the cells of a tables, and change fonts in the headers and footers.

Especially with large documents, there is a noticeable slowdown in printing when using ENABLERTF.

Parameters

ParameterDescription of FieldsCommentsDefault
Parm1 – EnableRTF<1> EnableRTF

1=Enabled 0=Disabled

0

Commonly Used Codes

The following table displays the most commonly used RTF codes.

CodeDescription
\bBold
\blueBlue
\bulletBullet (ANSI character 149)
\cbBackground Color
\fSelected Font
\fsFont Size
\gGreen
\iItalics
\qcAlign Center
\glAlign Left
\grAlign Right
\redRed
\subSubscript
\superSuperscript
\ulUnderline
\uldbDouble Underline
\ulhairHairline Underline
\ulthThick Underline

For a complete list of Microsoft supported RTF codes, follow this link.

Example

* The following example shows how to use the ENABLERTF message to print bold
* text in a header and a table.
declare function Set_Printer
stat = Set_Printer("START32") ; *start OIPI
stat = Set_Printer("INIT") ;* Start printing
 
*  enable the RTF codes in printing.
 
Stat = Set_Printer("ENABLERTF",1) ;* Enable RTF printing
 
stat = Set_Printer("HEADER", @VM:"{This is a {\b bold} RTF header.}")
stat = Set_Printer("TEXT", "This is a test.")
stat = Set_Printer("ADDTABLE", "1440":@VM:"1440", "", "{Row {\b 1} Col {\b 1}}":@VM:"{Row {\b 1} Col {\b 2}}":@FM:"Row 2 Col 1":@VM:"Row 2 Col 2", "", "", 0, 7)
stat = Set_Printer("TERM", 1) ;* End printing
  • No labels