以下是引用易服在2008-12-22 13:27:00的发言:能为代码加上注释更好
Dim pds As List(Of String) = DataTables("订单").GetUniqueValues("","产品")
For Each pd As String In pds
Vars("Caption") = pd
With Tables("订单")
.Filter = "[产品] = '" & pd & "'"
.Select(0,0,.Rows.Count-1,.Cols.Count-1)
End With
Dim Book As New XLS.Book(ProjectPath & "Attachments\订单.xls") '打开模板
Book.Build() '生成细节区
Book.Save(ProjectPath & "Reports\订单.xls") '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = ProjectPath & "Reports\订单.xls"
Proc.Verb = "Print"
Proc.Start()
Next
Tables("订单").Filter = ""
Tables("订单").Select(0,0)
[此贴子已经被作者于2008-12-22 13:27:16编辑过]
楼上的,老爹把鱼都给你了,就自己做来吃吧....
咱不能让老爹把鱼做熟了再吃吧?