Dim tb As Table = Tables("销售订单.销售明细") Dim pr As Row = Tables("销售订单").Current Dim bh As String = "订单编号 = '" & pr("订单编号") & "'" Dim Regions As List(Of String) = tb.DataTable.GetUniqueValues(bh,"管理员") For Each Region As String In Regions Tables("销售订单.销售明细").Filter = "[管理员] = '" & Region & "'" Dim Book As New XLS.Book(ProjectPath & "Attachments\book2.xls") Dim fl As String = ProjectPath & "Reports\book2.xls" Book.Build() '生成细节区 Book.Save(fl) '保存工作簿 Dim Proc As New Process '打开工作簿 Proc.File = fl proc.WaitForClose = True Proc.Start() Next Tables("销售订单.销售明细").Filter = ""
|