以下代码是打印汇总表中选择行的交易金额,为什么我选择了20行,以下代码只显示了10行,是什么原因?
Dim tbm As DataTable = DataTables("明细表")
Dim tbz As Table = Tables("汇总表")
Dim doc As New PrintDoc
Dim ra As New prt.RenderArea
Dim Date1 As Date =# 05-01-2012 #
Dim Date2 As Date = # 11-30-2012 #
For n As Integer = tbz.TopPosition To tbz.BottomPosition
Dim rt As New prt.RenderText
Dim filter = "交易户名= '" & tbz(n)("交易户名") & "' And 交易日期 >= # 2012-05-01 # And 交易日期 <= # 2012-11-30 # "
rt.text =format(date1,"D") & "至" & format(Date2,"D") & "交易金额" & tbm.Compute("sum(借方金额)",filter) & "元。"
ra.Children.Add(rt) '将打印对象添加到容器中
n = n + 1
Next
doc.body.Children.Add(ra)
doc.Preview()