改代码
Dim r As Row = Tables("理化检测_table3").Current
r("报告日期") = Date.Today()
Dim tm As String = ProjectPath & "Attachments\检测报告.doc" '指定模板文件
If user.group = "分析室" Then
Dim ffx As String = ProjectPath & "attachments\Reports\fxreports\" & e.form.controls("TextBox9").Text & ".doc" '指定目标文件
Dim wrtfx As New WordReport(Tables("理化检测_table3"),tm,ffx) '定义一个WordReport
wrtfx.Build() '逐行生成报表
wrtfx.quit() '显示报表
ElseIf user.group = "金相室" Then
Dim fjx As String = ProjectPath & "attachments\Reports\jxreports\" & e.form.controls("TextBox9").Text & ".doc" '指定目标文件
Dim wrtjx As New WordReport(Tables("理化检测_table3"),tm,fjx)
wrtjx.Build()
wrtjx.quit()
End If
r("检测状态") = "已发报告"
Forms("检测报告").open