Foxtable(狐表)用户栏目专家坐堂 → 筛选后打印


  共有10389人关注过本帖树形打印复制链接

主题:筛选后打印

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/12/14 14:16:00 [显示全部帖子]

Dim tb As Table = Tables("销售订单.销售明细")
Dim pr As Row = Tables("销售订单").Current
Dim bh As String  = "订单编号 = '" & pr("订单编号") & "'"
Dim Regions As List(Of String) = tb.DataTable.GetUniqueValues(bh,"管理员")
For Each Region As String In Regions
    Tables("销售订单.销售明细").Filter = "[管理员] = '" & Region & "'"
    Dim Book As New XLS.Book(ProjectPath & "Attachments\book2.xls")
    Dim fl As String = ProjectPath & "Reports\book2.xls"
    Book.Build() '生成细节区
    Book.Save(fl) '保存工作簿
    Dim Proc As New Process '打开工作簿
    Proc.File = fl
    proc.WaitForClose = True
    Proc.Start()
Next
Tables("销售订单.销售明细").Filter = ""

 回到顶部