I have two issues, first I need to add a manual page break into my table (at a place where it makes sense and not just somewhere automatically). Second, all my cells have a bottom line, but the last one should not have one.

I have two issues, first I need to add a manual page break into my table (at a place where it makes sense and not just somewhere automatically). Second, all my cells have a bottom line, but the last one should not have one.
Hi,
Regarding your second question, I believe I have a solution to your issue.
Try this fix:
// Insert this code in your main function after code merging data with Document object.
dataRowsTotal = DataSet.Tables["Data"].Rows.Count;
DocumentBuilder builder = new DocumentBuilder(document);
// Iterate through all columns and clear bottom and top line style.
for (int colIdx = 0; colIdx < 5; colIdx++){
builder.MoveToCell(1, dataRowsTotal + 1, colIdx, 0);
builder.CellFormat.Borders.Bottom.LineStyle = LineStyle.None;
builder.MoveToCell(1, dataRowsTotal + 2, colIdx, 0);
builder.CellFormat.Borders.Top.LineStyle = LineStyle.None;
}
It will remove the light gray line from the last entry in the table rows and does not require to set up a MergeFieldEventHandler. I believe this is what you wanted to achieve, it should give you the idea.
What was causing the issue is your table has very tiny rows separating the second and second to last rows which was confusing things. Also setting the Row.LineStyle to none for just Bottom was not working, it also required to set the next row’s Top.LineStyle as well.
Thanks,
Thanks, that helped. I’ve implemented it like this: