Foxtable(狐表)用户栏目专家坐堂 → [求助]带条码的WORD报表打印


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

主题:[求助]带条码的WORD报表打印

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/1/4 11:47:00 [显示全部帖子]


Dim t As Table = e.Form.Controls("Table1").Table
For Each r1 As Row In t.GetCheckedRows()
    Dim Bar As New BarCodeBuilder
    Bar.Symbology = Barpro.Symbology.QRCode
    Bar.Code = r1("箱号")
    Bar.BarRatio = 0.3
    Bar.BarHeight = 8
    bar.SaveImage(ProjectPath & "Images\myimg.wmf",300)
    Dim tm As String  = ProjectPath & "Attachments\物料标签.doc" '指定模板文件
    Dim fl1 As String = ProjectPath & "Reports\物料标签\" & r1("箱号") & "物料标签.doc"
    Dim fl2 As String = ProjectPath & "Reports\物料标签\" & r1("箱号") & "物料标签.pdf"
    Dim wrt As New WordReport(Tables("标签创建"),tm,fl1)
    wrt.Build() '逐行生成报表
    wrt.SaveToPDF(fl2) '保存为PDF文件
    wrt.Quit() '退出
    Dim Proc As New Process '打开PDF文件
    Proc.File = fl2
    Proc.Start()
Next


 回到顶部