Dim nms3 As List(of String()) = DataTables("单据").GetValues("单号|企业名称", Tables("单据").filter)
For Each nms() As String In nms3
e.Form.controls("TextBox5").value=nms(0)
Dim str As String =nms(0)
Dim fdr As DataRow = DataTables("单据").find("单号 = '" & str & "'","单号")
Dim s As String =fdr("单号")
If fdr IsNot Nothing Then
e.Form.controls("单据").Table.filter ="单号 = '" & s & "'"
Else
msgbox("没有了")
End If
e.Form.controls("TextBox5").value =fdr("单号")
e.Form.controls("ComboBox7").value = fdr("企业名称")
e.Form.controls("DateTimePicker7").value = fdr("日期")
e.Form.controls("ComboBox8").value = fdr("单据类别")
e.Form.controls("ComboBox9").value = fdr("对方单位")
Dim tb As WinForm.TabControl = e.Form.Controls("应收立帐")
Dim pg As WinForm.TabPage = tb.SelectedPage
Dim doc As PrintDoc = e.Form.GernatePrintDoc(pg)
Doc.Preview()
Next
现在想一张张预览后连续打印,但是现在只能打印一张,循环发挥不了作用