老师帮我看一下代码哪错了...
需要在打开报表前先勾选指定行... 但打开报表 就都失效只会打开第一笔...
窗口的 打开报表按钮 click 事件:
Dim ds As list(Of Row) = Tables("项目总览表.设计来源档.设计明细档").GetCheckedRows
If ds.count <= 0 Then
msgbox("没有在Step1勾选要打印的单身序号!!")
Return
Else
MessageBox.Show("开启约需5-10秒钟,请勿重覆点击!")
Tables("项目总览表.设计来源档.设计明细档").DataTable.Load()
End If
For Each r As Row In ds
Dim Book As New XLS.Book(ProjectPath & "Attachments\设计下发指导书.xlsx")
Dim fl As String = ProjectPath & "Reports\设计下发指导书" & r.index & ".xlsx"
'Dim fl As String = ProjectPath & "Reports\设计下发指导书.xlsx"
r.Table.Position = r.Index
Book.Build() '生成细节区
Book.Save(fl) '保存为PDF文件
Dim Proc As New Process '打开PDF文件
Proc.File = fl
Proc.Start()
Next