设置对账单按钮,。。一直跳错误。。不知道哪里没弄好,。求帮助
datatables("对账单").datarows.clear
tables("对账窗体_出库明细表").stopredraw
dim cj as winform.combobox = e.form.controls("厂家筛选")
tables("对账窗体_出库明细表").filter = "对账单 = true and 订单客户 = '" & cj.text &"'"
for each r1 as Row in tables("对账窗体_出库明细表")
dim r2 as Row = tables("对账单").addnew
r2("出库单号") = r1("出库单号")
r2("制单日期") = r1("制单日期")
r2("物料编号") = r1("物料编号")
r2("物料名称") = r1("物料名称")
r2("型号") = r1("型号")
r2("单价") = r1("单价")
r2("实交数量") = r1("实交数量")
r2("金额") = r1("金额")
next
tables("对账窗体_出库明细表").filter = "订单客户 = '" & cj.text & "'"
tables("对账窗体_出库明细表").resumeredraw
dim Book as new xls.book (ProjectPath & "Attachments\对账单.xls")
dim fl as string = projectpath & "reports\对账单xls"
book.build()
book.save(fl)
dim proc as new process
proc.file = fl
proc.start()
此主题相关图片如下:123.bmp
[此贴子已经被作者于2013-4-15 0:21:43编辑过]