老师好!
在Word模板中,设置特定字符串" [主题图片] ", 在生成报表时用图片去替换它。
单行生成报表时没有问题,多行生成的报表,报表中的图片都是第一行的,这个问题怎样处理?
Dim rs As List(of Row) = Tables("出库").GetCheckedRows
If rs.Count > 0 Then
Dim tm As String = ProjectPath & "Attachments\出库单.doc"
Dim fl As String = ProjectPath & "Reports\出库单.doc"
Dim wrt As New WordReport(Tables("出库"),tm,fl)
For Each r As Row In rs
wrt.ReplaceWithImage("[主题图片]", ProjectPath & "Attachments\主题图片\" & dr("主题图片"), 370, 260)
wrt.BuildOne(r)
Next
wrt.Show() '显示报表
End If