Dim r As Row = Tables("退休人员信息").current
If (r("工资序列") = "专技" OrElse r("工资序列") = "管理")
If r.IsNull("连续工龄起算时间") = False Then
Dim tm As String = ProjectPath & "Attachments\\专技doc" \'指定模板文件
Dim fl As String = ProjectPath & "Reports\\退休制文\\" & format(Date.Today,"yyyy-MM") & "\\关于" & r("姓名") & "同志退休的通知.doc"
Dim wrt As New WordReport(Tables("退休人员信息"),tm,fl) \'定义一个WordReport
wrt.Build() \'逐行生成报表
wrt.Show() \'显示报表
Else
Dim tm1 As String = ProjectPath & "Attachments\\专技(间断).doc" \'指定模板文件
Dim fl1 As String = ProjectPath & "Reports\\退休制文\\" & format(Date.Today,"yyyy-MM") & "\\关于" & r("姓名") & "同志退休的通知.doc"
Dim wrt As New WordReport(Tables("退休人员信息"),tm1,fl1) \'定义一个WordReport
wrt.Build() \'逐行生成报表
wrt.Show() \'显示报表
End If
ElseIf r("工资序列") = "工勤"
If r.IsNull("连续工龄起算时间") = False Then
Dim tm2 As String = ProjectPath & "Attachments\\工勤.doc" \'指定模板文件
Dim fl2 As String = ProjectPath & "Reports\\退休制文\\" & format(Date.Today,"yyyy-MM") & "\\关于" & r("姓名") & "同志退休的通知.doc"
Dim wrt As New WordReport(Tables("退休人员信息"),tm2,fl2) \'定义一个WordReport
wrt.Build() \'逐行生成报表
wrt.Show() \'显示报表
Else
Dim tm3 As String = ProjectPath & "Attachments\\工勤(间断).doc" \'指定模板文件
Dim fl3 As String = ProjectPath & "Reports\\退休制文\\" & format(Date.Today,"yyyy-MM") & "\\关于" & r("姓名") & "同志退休的通知.doc"
Dim wrt As New WordReport(Tables("退休人员信息"),tm3,fl3) \'定义一个WordReport
wrt.Build() \'逐行生成报表
wrt.Show() \'显示报表
End If
End If