Hello,
I"m new to working with tables in FusionPro and I have a problem I can't resolve. Part of the job I'm working on has a table with anywhere from 1 to 8 possible rows, then 4 rows of totals flush right. There is also formatted text below this that must move with the table size (1 to 8 rows).
I've been able to handle the first 8 rows by altering a SteP script from the forum which surpresses a row based on a field, but I can't get past these 8 rows.
Here's where my script is at:
var fields = [[Field("Plan/Item 1 Name"), Field("Plan/Item 1 QTY"), Field("Plan/Item 1 Sec"), Field("Plan/Item 1 Row"), Field("Plan/Item 1 Block"), "$"+ Field("Plan/Item 1 Per"), "$"+ Field("Plan/Item 1 Total")],
[Field("Plan/Item 2 Name"), Field("Plan/Item 2 QTY"), Field("Plan/Item 2 Sec"), Field("Plan/Item 2 Row"), Field("Plan/Item 2 Block"), "$"+ Field("Plan/Item 2 Per"), "$"+ Field("Plan/Item 2 Total")],
[Field("Plan/Item 3 Name"), Field("Plan/Item 3 QTY"), Field("Plan/Item 3 Sec"), Field("Plan/Item 3 Row"), Field("Plan/Item 3 Block"), "$"+ Field("Plan/Item 3 Per"), "$"+ Field("Plan/Item 3 Total")],
[Field("Plan/Item 4 Name"), Field("Plan/Item 4 QTY"), Field("Plan/Item 4 Sec"), Field("Plan/Item 4 Row"), Field("Plan/Item 4 Block"), "$"+ Field("Plan/Item 4 Per"), "$"+ Field("Plan/Item 4 Total")],
[Field("Plan/Item 5 Name"), Field("Plan/Item 5 QTY"), Field("Plan/Item 5 Sec"), Field("Plan/Item 5 Row"), Field("Plan/Item 5 Block"), "$"+ Field("Plan/Item 5 Per"), "$"+ Field("Plan/Item 5 Total")],
[Field("Plan/Item 6 Name"), Field("Plan/Item 6 QTY"), Field("Plan/Item 6 Sec"), Field("Plan/Item 6 Row"), Field("Plan/Item 6 Block"), "$"+ Field("Plan/Item 6 Per"), "$"+ Field("Plan/Item 6 Total")],
[Field("Plan/Item 7 Name"), Field("Plan/Item 7 QTY"), Field("Plan/Item 7 Sec"), Field("Plan/Item 7 Row"), Field("Plan/Item 7 Block"), "$"+ Field("Plan/Item 7 Per"), "$"+ Field("Plan/Item 7 Total")],
[Field("Plan/Item 8 Name"), Field("Plan/Item 8 QTY"), Field("Plan/Item 8 Sec"), Field("Plan/Item 8 Row"), Field("Plan/Item 8 Block"), "$"+ Field("Plan/Item 8 Per"), "$"+ Field("Plan/Item 8 Total")],
]
var myTable = new FPTable;
myTable.AddColumns(19400, 4300, 4500, 4500, 8200, 7200, 6000);
myTable.AddRows(9);
for (var i=0; i<9; i++) {
if (fields[2] != "NULL") {
//myTable.Rows.Cells[0].SetBorders("Thin","Black","Top","Bottom","Right","Left");
myTable.Rows.CopyCells(0,1,2,3,4,5,6);
myTable.Rows.Cells[0].HAlign = "Left";
myTable.Rows.SetContents(fields[0], fields[1], fields[2], fields[3], fields[4], fields[5], fields[6]);
}
}
return myTable.MakeTags();
_____________________________________________________________
I've made a formatted text resource and added it after the table, but it still sees the table as 8 rows even if they aren't visible.
Please see attached screenshot for clarity
Any suggestions are greatly appreciated!
___________________________________________
MAC OS 10.13.6, FusionPro 10.1.11, Acrobat 11.0.23