Page History
Note |
---|
The ADDTABLE message should be used in place of all TABLE and TEXTCOL messages. |
Description
The ADDTABLE message is used to print tables and columnar reports.
...
Parameter | Description of Fields | Comments | Default |
---|---|---|---|
Parm1 - Column Format | <1> Column formatting | Use @VM between column formatting. Column Alignment: < Left > Right ^ Center = Full Column Position: _ Vert bottom + Vert center ~ No wrapping ! Vert line | "" |
Parm2 - Header | <1> Header text | Use @VM between column headers | "" |
Parm3 - Body | <1> Table body | @FM between rows and @VM between columns | "" |
Parm4 - HeaderShade | <1> Shading color for the header | RGB color code for header shading | "" |
Parm5 - BodyShade | <1> Shading color for the body | RGB color code for body shading | "" |
Parm6 - Append | <1> Append to the end of previous table | If 1, then the Body is appended to the end of the previous table | 0 |
Parm7 - Format | <1> Border See OIPRINT_EQUATES | Border style for the entire table | 0 - None |
<2> Position | L Left R Right C Center F Flush Position | "L" |
See also
Example
See the OIPI_EXAMPLE2 program that was installed by the setup program for an example on how to use the ADDTABLE message.
...
Code Block |
---|
function AddTableTest declare function Set_Printer, RGB $insert OIPRINT_EQUATES x = Set_Printer("INIT", "AddTableTest", "AddTableTest", "", "", 4) if x < 0 then call msg("","INIT Error = ":x) return 0 end table = "1,2,3,4/" table := "5,6,7,8/" table := "9,10,11,12/" table := "Row Number 4 - Column Number 1,Row Number 4 - Column Number 2,Row Number 4 - Column Number 3,Row Number 4 - Column Number 4" convert "," to @vm in table convert "/" to @fm in table head = "Column 1":@VM: "Column 2":@VM: "Column 3":@VM: "Column 4" x = Set_Printer("TEXT", @FM: "ADDTABLE":@FM) x = Set_Printer("ADDTABLE", "+<2160":@VM: "_^2160":@VM: "~>2160":@VM: "=2160", head, table, RGB(255, 0, 0), RGB(128, 128, 255), 0, TB_ALL) * append x = Set_Printer("ADDTABLE", "+<2160":@VM: "_^2160":@VM: "~>2160":@VM: "=2160", head, table, RGB(255, 0, 0), RGB(128, 128, 255), 1, TB_ALL) stat = Set_Printer("TERM") return 1 |
...
This example shows how to use the ADDTABLE message to print a columnar report. Each column is 1 inch and the "~" flag is used to prevent word wrapping in all columns. The first two columns are left justified and the last two columns are right justified.
...
Code Block |
---|
function ColumnTableTest declare function Set_Printer, RGB $insert OIPRINT_EQUATES x = Set_Printer("INIT", "ColumnTableTest", "ColumnTableTest", "", "", 4) if x < 0 then call msg("","INIT Error = ":x) return 0 end table = "1,2,3,4/" table := "5,6,7,8/" table := "9,10,11,12/" table := "Row Number 4 - Column Number 1,Row Number 4 - Column Number 2,Row Number 4 - Column Number 3,Row Number 4 - Column Number 4" convert "," to @vm in table convert "/" to @fm in table head = "Column 1":@VM: "Column 2":@VM: "Column 3":@VM: "Column 4" x = Set_Printer("TEXT", @FM: "ADDTABLE":@FM) x = Set_Printer("ADDTABLE", "~1440":@VM: "~1440":@VM: ">~1440":@VM: ">~1440", head, table, "", "", 0, 0) stat = Set_Printer("TERM") return 1 |