Dear community,
I spent a lot of time today, but I could not achieve a result. How do I create a table like this? More precisely - how to make cell number 5 correctly?
Below is my code, but it only works until I add the 5th column and the 5th cell to it (it forms a table like in Picture 2). I have experienced many options, but I don't understand how to do it correctly :(
They only get this result.
I ask for your advice.
var oO = Context.createOutputObject(); var colWidthList = new java.util.ArrayList(); colWidthList.add(12); colWidthList.add(12); colWidthList.add(12); colWidthList.add(12); colWidthList.add(12); oO.BeginTable(100,colWidthList,Constants.C_BLACK,Constants.C_TRANSPARENT,Constants.FMT_CENTER | Constants.FMT_BOLD,0); oO.TableRow(); oO.TableCell("Col 1",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0); oO.TableCell("Col 2",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0); oO.TableCell("Col 3",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0); oO.TableCell("Col 4",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0); oO.TableCell("Входящие 5",1,1,"Times New Roman",12,Constants.C_BLACK,Constants.C_GREY_80_PERCENT,0,Constants.FMT_CENTER | Constants.FMT_BOLD,0); oO.TableRow(); oO.TableCell("Cell 1",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 2",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 31",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 41",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 32",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 42",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 33",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 43 ",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 34",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 44",1,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.TableCell("Cell 5",4,1,"Times New Roman",10,Constants.C_BLACK,Constants.C_TRANSPARENT,0,Constants.FMT_LEFT,0); oO.WriteReport();
Robert Goldenbaum on
Hi,
you have to add multiple rows.
Row1: Header row
Row 2: Row for cell 1 (size 4,1), cell 2 (size 4,1), cell 3 (size 1,1), cell 4 (size 1,1), cell 5 (size 4,1)
Row3: Row for cell 3 (size 1,1), cell 4 (size 1,1),
Row4: Row for cell 3 (size 1,1), cell 4 (size 1,1),
Row5: Row for cell 3 (size 1,1), cell 4 (size 1,1),
BR Robert