Dim Result As DialogResult
For Each dr As DataRow In DataTables("生产计划明细表").Select("清单条码编码 is not null")
Dim Book As New XLS.Book(ProjectPath & "Attachments\生产工艺加工流程卡模板.xls")
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Dim fl As String = ProjectPath & "Reports\" & dr("清单条码编码") & ".xls"
Book.Build() '生成细节区
Book.Save(fl)
Result = MessageBox.Show("报表已生成,要预览还是打印?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
Dim Proc As New Process
Proc.File = fl
Proc.Start()
End If
Next