I am trying to use the function printTable() to print a table to a PDF file.
I am using the mapping options that looks as follows:
Code: Select all
mapping mOptions = makeMapping();
mOptions["showDialog"] = bPrint;
mOptions["header"] = makeDynString();
mOptions["footer"] = makeDynString("\\right{\\page | \\numpages");
mOptions["columnsType"] = PT_INDEXEDCOLUMNS;
mOptions["columns"] = makeDynInt(2,3,4,5,6,7,8,9,10,11);
mOptions["fitToWidth"] = bFitToPage;
mOptions["printerName"] = (bPrint) ? "" : "file:///" + strFile;
mOptions["font"] = strFont;
mOptions["useColor"] = (int)bKleur; // 0 = no color used, 1 = cell color
int iResult = printTable(sTable, mOptions);
Code: Select all
WCCOAui (1), 2021.12.16 10:04:46.890, CTRL, SEVERE, 5/ctrl, Location of the following log entry:
Module: Vision_3
Panel: D:\project_source\LBSLIB\LBSLIB\LBSlibOA\panels\08_Historie\3B_Logging_Export.xml [3B Logging export]
Object: 12 named: "KNOP_Exporteren" of type: PUSH_BUTTON
Script: Clicked
Library: D:\project_source\LBSLIB\LBSLIB\LBSlibOA\scripts\libs\lbs_Logging.ctl
Line: 1009
WCCOAui (1), 2021.12.16 10:04:46.890, PARAM,SEVERE, 51, Parameter incorrect,
Module: Vision_3
Panel: D:\project_source\LBSLIB\LBSLIB\LBSlibOA\panels\08_Historie\3B_Logging_Export.xml [3B Logging export]
Object: 12 named: "KNOP_Exporteren" of type: PUSH_BUTTON
Script: Clicked
Library: D:\project_source\LBSLIB\LBSLIB\LBSlibOA\scripts\libs\lbs_Logging.ctl
Line: 1009, printTable, columnDefinition: index out of range: 111115696
WCCOAui1:[mapping 7 items
WCCOAui1: "columnsType" : 3
WCCOAui1: "useColor" : 1
WCCOAui1: "columns" : dyn_int 10 items
WCCOAui1: 1: 2
WCCOAui1: 2: 3
WCCOAui1: 3: 4
WCCOAui1: 4: 5
WCCOAui1: 5: 6
WCCOAui1: 6: 7
WCCOAui1: 7: 8
WCCOAui1: 8: 9
WCCOAui1: 9: 10
WCCOAui1: 10: 11
WCCOAui1: "printerName" : "file:///D:/project_source/LBSLIB/LBSLIB/LBSlibOA/data/export/3B_Export_20211216.pdf"
WCCOAui1: "font" : "Arial,-1,15,5,50,0,0,0,0,0,Regular"
WCCOAui1: "showDialog" : FALSE
WCCOAui1: "fitToWidth" : TRUE
WCCOAui1:]
WCCOAui1:[0]