Hello all:
I was wondering if you can provide me with some assistance.
I have a table that contains a variable amount of rows based on the number of dependents each record contains.
I have found this logic from a previous thread and it works great:
var fields = [[Rule("Dep1_Rule"),Field("dep1dob"),Field("dep1rel")],[Field("dep2fname") + " " + Field("dep2lname"), Field("dep2dob"), Field("dep2rel")],[Field("dep3fname") + " " + Field("dep3lname"),Field("dep3dob"), Field("dep3rel")],
[Field("dep4lfname") + " " + Field("dep4lname"),Field("dep4dob"), Field("dep4rel")],[Field("dep5fname") + " " + Field("dep5lname"),Field("dep5dob"), Field("dep5rel")],[Field("dep6fname") + " " + Field("dep6lname"),Field("dep6dob"), Field("dep6rel")]];
var myTable = new FPTable;
myTable.AddColumns(14400, 6100, 8500);
myTable.AddRows(6);
for (var i=0; i<6; i++) {
if (fields[2] != "") {
myTable.Rows.Cells[0].Font="Calibri"
myTable.Rows.Cells[0].PointSize = 10;
myTable.Rows.Cells[0].SetBorders("Thin","Black","Top","Bottom","Right","Left");
myTable.Rows.CopyCells(0,1,2);
myTable.Rows.Cells[0].HAlign = "Left";
myTable.Rows.SetContents(fields[0], fields[1], fields[2]);
}
}
return myTable.MakeTags();
The problem I'm having is that I need to be able to add a header row (3 Columns) that contain "Name", "Birth Date", "Relationship".
I've tried a couple of things but nothing seems to work. I'm pretty new to making tables so any assistance you can provide would be appreciated.