Description
The HEADER message is used to set the page and column headers. The font that is used by the HEADER message is set with the FONTHEADFOOT message.
Parameters
The Header parameter is used to specify the header text. The ColLen parameter is used to specify the widths of each column in inches. The position of the first column is always the left margin. There is approximately one character distance between each column. To change the distance between the columns use the CONTROL message. To set the first page header use the CONTROL message. The ColHeader parameter is used to set the column headers. The column headers are delimited with @FM. The ColHeader parameter is not required, but the ColLen parameter is required for printing columnar text. When the ColLen parameter is set, the TEXTCOL message can be used to print columnar text. The column header uses @VM between columns, and @FM between rows. The ColJust is used to set the justification for each column with @FM between columns. To mix standard text with columnar text use the TEXT and TEXTCOL messages.
Parameter | Description of Fields | Comments | Default |
---|---|---|---|
Parm1 - Header | <1> Header | "Header String" can contain: 'P' Current page 'D' Current date 'T' Current time 'F' File name Left:@VM:Center:@VM:Right @FM between lines | "" |
Parm2 - ColLen | <1> Column Lengths | In inches, with @FM between columns. | "" |
Parm3 - ColHeader | <1> Column Header | @VM between columns, and @FM between rows | "" |
Parm4 - ColJust | <1> Column Justifications | "L", "R", "C" with @FM between columns | "L" |
Remarks
The header can contain special codes in single quotes to insert data into the header and control the output of the header. The 'D' code for date will use the Short Date format from the International section of the Windows Control Panel. Use the 'DL' code to print the date using the Long Date format from the International section of the Windows Control Panel. Use @FM to delimit lines in the header, and use @VM to separate the left, center, and right justified header text. The header will be placed just above the top margin. Make sure there is enough room for the header text and font above the top margin, otherwise the header will be clipped.
See also
FONTHEADFOOT, FOOTER Set_Printer messages
Example
/* The following example shows how to use the HEADER message to set the column header and page header. The HEADER message creates 3 columns with the column lengths of 1, 2, and 3 inches. */ declare function Set_Printer stat = Set_Printer("INIT") ;* Start printing header = @VM: "This is the main Header 'D'":@VM: "Page 'P'" colLen = "1,2,3" colHeader = "Col1,Col2,Col3" colText = "111,222,333/aaa,bbb,ccc/AAA,BBB,CCC" * Convert delimiters convert "," to @fm in colLen ; convert "," to @vm in colHeader convert "," to @vm in colText ; convert "/" to @fm in colText * Set header and column information stat = Set_Printer("HEADER", header, colLen, colHeader) stat = Set_Printer("TEXTCOL", colText) ; * Print column text stat = Set_Printer("TERM") ;* End printing