-- 生成Word报表出错.
Dim t As Table = Tables(e.Form.Name & "_Table1")
Dim r As Row = Tables(e.Form.Name & "_Table1").Current
If r IsNot Nothing Then
Dim Result As DialogResult
Result = MessageBox.Show("您确定要为 " & r("姓名") & e.Sender.Text & "吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
\'这里是您的打印代码
Dim frm As WinForm.Form = Forms("报表")
frm.Show()
Dim w As Integer = SysInfo.ScreenWidth
Dim h As Integer = SysInfo.ScreenHeight
frm.BaseForm.SetBounds((w - 820)/2, 0, 820, 700)
Dim wbr As WinForm.WebBrowser = frm.Controls("WebBrowser1")
Dim tm As String = ProjectPath & "Attachments\\佛山转诊单.doc"
Dim fl As String = ProjectPath & "Reports\\佛山转诊单.doc"
Dim wrt As New WordReport(t,tm,fl)
wrt.Build()
wrt.Quit()
wbr.AddRess = fl
End If
Else
MessageBox.Show("当前无记录!")
End If
红色行出错.
此主题相关图片如下:word.jpg