在进行word报表套打时,正文是仿宋体,标题需要为黑体,如何在模板打印代码中设置。代码如下:'''
Dim tm As String = ProjectPath & "Attachments\议题落实情况汇报.doc"
Dim fl As String = ProjectPath & "党组议题汇报\议题落实情况汇报.doc"
Dim wrt As New WordReport(Tables("党组议题"),tm,fl) '定义一个WordReport
Dim count As Integer = 0
For Each r As Row In Tables("党组议题").Rows
If r.IsNull("项目序号") = False Then
count += r("项目序号").Length/2
End If
Next
wrt.Replace("[计数]",count) 'Tables("政府会议_任免").Compute("Count(姓名)")) '用代码计算出总的销售数量并替换模板中的合计
Dim str1 As String = ""
Dim ls As List(Of String()) = DataTables("党组议题").GetValues("项目序号|研究事项|责任单位|落实情况|具体措施", Tables("党组议题").Filter,"序号")
For i As Integer = 0 To ls.Count - 1
Dim s() As String = ls(i)
Dim flag As String = vbcrlf & ""
If s(0) > "" Then
str1 &= s(0) & s(1) & "。" & "(责任单位:" & s(2) & ")" & flag &"落实情况:"& s(3) &"。"& s(4) &"。"& flag
End If
Next
wrt.Replace("[列表]", str1)
wrt.Build() '生成报表
wrt.Show() '显示报表
其中,标红的字段需设置为黑体。如何设置,谢谢。