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


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

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

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


加好友 发短信
等级:一尾狐 帖子:422 积分:3430 威望:0 精华:0 注册:2015/5/20 8:44:00
[求助]带条码的WORD报表打印  发帖心情 Post By:2018/1/4 10:44:00 [只看该作者]

Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
For Each r As Row In Tables("标签创建").Rows
    Bar.Code = r("箱号")
Next
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\myimg.wmf",300)

Dim t As Table = e.Form.Controls("Table1").Table
For Each r1 As Row In t.GetCheckedRows()
    t.Position = r1.Index
    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

窗口:Tables("标签创建").ShowCheckBox = True

想要对选中的每一行分别生成一个WORD,以箱号作为条码内容,但现在获取的条码无法与该刚箱号对应,应该怎么修改

 回到顶部
帅哥哟,离线,有人找我吗?
l1q2lq
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:422 积分:3430 威望:0 精华:0 注册:2015/5/20 8:44:00
  发帖心情 Post By:2018/1/4 11:35:00 [只看该作者]

求教老师

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | 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


 回到顶部