Dim tm As String = ProjectPath & "Attachments\\信阳市病退劳动能力鉴定通知.doc"
Dim fl As String = ProjectPath & "Reports\\信阳市病退劳动能力鉴定通知.doc"
Dim wrt As New WordReport(Tables("劳动能力鉴定_鉴定"),tm,fl) \'定义一个WordReport
wrt.Replace("[总计数]",Tables("劳动能力鉴定_鉴定").Compute("Count(姓名)")) \'用代码计算出总的销售数量并替换模板中的合计
wrt.Replace("[完全丧失劳动能力]",Tables("劳动能力鉴定_鉴定").Compute("Count(姓名)", "[鉴委会意见] Like \'%完全%\'"))
wrt.Replace("[姓名2]",Tables("劳动能力鉴定_鉴定").Compute("[姓名]", "[鉴委会意见] Like \'%部分%\'"))
wrt.Replace("[不符合条件]",Tables("劳动能力鉴定_鉴定").Compute("Count(姓名)", "[鉴委会意见] Like \'%大部分%\'or [鉴委会意见] Like \'%部分%\'"))
wrt.Build() \'生成报表
wrt.Show() \'显示报表