老师:您好! 我按照您的指导意见,写的代码出现了错误信息,烦请再帮助一下。
Dim Result As DialogResult
Dim b As WinForm.TextBox = e.Form.Controls("TextBox1")
'b.BackColor = Color.Red
Dim gzh As String = b.Value
Dim Book As New XLS.Book(ProjectPath & "Attachments\生产工艺加工流程卡模板.xls")
Dim fl As String = ProjectPath & "Reports\打印工艺卡.xls"
Dim s As String = ""
Dim rs As list(Of Row) = Tables("生产计划明细表").GetCheckedRows
If rs.count = 0 Then
msgbox("没有勾选")
Return
End If
For Each r As Row In Tables("生产计划明细表").GetCheckedRows
s = s & "," & r("_Identify")
Next
s = s.Trim(",")
Tables("生产计划明细表").Filter = "[_Identify] in (" & s & ")"
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = fl
'Proc.Verb = "Print" '指定动作
Proc.Start()
我 选中的记录和错误信息请看图片。
此主题相关图片如下:打印卡2.jpg