Dan,
Now I'm having an issue where I set a cell's color after I've created the table based on a variable. It will work for the first cell but it will not for the remaining two. See below.
myTable.Rows[0].Cells[0].Font="R Frutiger Roman";
myTable.Rows[0].Cells[0].TextColor="Black";
myTable.Rows[0].Cells[0].SetBorders("Medium", "Black", "Top");
myTable.Rows[0].Cells[0].SetBorders("Thin", "Gray", "Bottom");
myTable.Rows[0].Cells[0].Content = Field("numberPayments") + " payments @ $0 followed by";
myTable.Rows[0].Cells[0].VAlign = "Middle";
myTable.Rows[0].Cells[0].ShadePct = 10;
myTable.Rows[1].Cells[0].Font="R Frutiger Roman";
myTable.Rows[1].Cells[0].TextColor="Black";
myTable.Rows[1].Cells[0].SetBorders("Thin", "Gray", "Bottom");
myTable.Rows[1].Cells[0].Content = "Payment";
myTable.Rows[1].Cells[0].VAlign = "Middle";
myTable.Rows[1].Cells[0].ShadePct = 10;
myTable.Rows[2].Cells[0].Font="R Frutiger Roman";
myTable.Rows[2].Cells[0].TextColor="Black";
myTable.Rows[2].Cells[0].SetBorders("Thin", "Black", "Bottom");
myTable.Rows[2].Cells[0].Content = "Rate";
myTable.Rows[2].Cells[0].VAlign = "Middle";
myTable.Rows[2].Cells[0].ShadePct = 10;
//////////
if (Field("vendor") == "VendorA")
myTable.Rows[0].Cells[0].ShadeColor = "Forest";
myTable.Rows[1].Cells[0].ShadeColor = "Forest";
myTable.Rows[2].Cells[0].ShadeColor = "Forest";
if (Field("vendor") == "VendorB")
myTable.Rows[0].Cells[0].ShadeColor = "Warm Gray";
myTable.Rows[1].Cells[0].ShadeColor = "Warm Gray";
myTable.Rows[2].Cells[0].ShadeColor = "Warm Gray";
return myTable.MakeTags();
The example above will make the first row's cell color Forest, but the 2 remaining rows are set at Warm Gray. Where am I messing up?
Thanks in advance.