your subtraction is just a smidge off. you're subtracting your last_pos
by the current table instead of the previous table. you should be doing this:
Dim last_pos As Integer = 580
Const xpos As Integer = 70
For i = 0 To extreme_foods.Count - 1
datatable.AddCell(extreme_foods(i))
Next
datatable.WriteSelectedRows(0, -1, xpos, last_pos, writer.DirectContent)
For i = 0 To moderate_foods.Count - 1
datatable1.AddCell(moderate_foods(i))
Next
last_pos = last_pos - datatable.TotalHeight '<--- NOT datatable1'
datatable1.WriteSelectedRows(0, -1, xpos, last_pos, writer.DirectContent)
Jason
2009-09-03 21:29:31