Dim dic As
new Dictionary(Of String, String)
If dic.ContainsKey(r("表单编号")) =
False Then
dic.add(r("表单编号"),
r("_Identify"))
Else
dic(r("表单编号")) =
dic(r("表单编号")) & "," &
r("_Identify")
End If
For Each key
As String In dic.Keys
Tables("开单管理_Table1").Filter = "[_Identify] in (" &
dic(key) & ")"
Dim Book As New XLS.Book(ProjectPath & "Attachments\" & key
& ".xls")
Dim fl As String = ProjectPath & "Reports\" &
Tables("T_Report").current("报告编号")& "&" & key & ".xls"
vars("编号") = key
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = fl
Proc.Start()
Next
Tables("开单管理_Table1").Filter
= " 报告编号 = ‘" & Tables("T_Report").current("报告编号")& "’”
若我将原来是直接用关联表的话,现在修改为table副本的,发现这个无法实现,还是直接全部打印,若之前直接用关联表的话,可以实现,但打印之后会造成再打开其它报告的时关联的清单全部不出现;