参考:http://foxtable.com/bbs/dispbbs.asp?boardid=2&Id=93847
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
Dim idx As Integer = 0
Dim idx2 As Integer = 0
Dim t As Table = e.Form.Controls("Table1").Table
For Each c As object In Doc.Body.Children
If Typeof c Is prt.RenderText Then
If c.text = "合计金额" Then
Dim count As Double = 0
For i As Integer = idx To idx + 7
count += val(t.Rows(i)("实报金额合计"))
Next
c.text = "合计金额" & cstr(count)
idx += 8
End If
End If
Next
doc.Preview()