不知错在那里,还是不能显示
For Each r As Row In Tables("jbxx").Rows
Dim p As WinForm.ProgressBar
p = e.Form.Controls("ProgressBar1")
p.Minimum = 0 '设置最小值
p.Value = 0 '设置当前值
Dim drs As List(of DataRow) = DataTables("jbxx").Select(" zz='" & r("zz") & "'and bh ='" & r("bh") & "'and sj ='" & r("sj") & "'")''筛选出符合条件的行
If drs.Count > 0 Then '如果存在符合条件的行
p.Maximum = drs.Count '设置最大值
For i As Integer = 0 To drs.count - 1 '逐行生成报表
Dim dr As DataRow = drs(i)
'For Each dr As DataRow In drs '逐行生成报表
Dim tm As String = ProjectPath & "Attachments\ A3模板定.doc" '指定模板文件
Dim fl As String = ProjectPath & "导出\" & dr("zz") & dr("bh") & dr("xm") & dr("sj") & ".doc" '指定目标文件
Dim wrt As New WordReport(Tables("jbxx"),tm,fl) '定义一个WordReport
wrt.BuildOne(dr)
wrt.Quit
If i Mod 10 = 0 Then
p.Value = i '当前值为已经完成的行数
End If
Application.DOEVents()
Next
End If
Next