以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]关于逐个标签生成  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=126157)

--  作者:l1q2lq
--  发布时间:2018/10/15 19:50:00
--  [求助]关于逐个标签生成
Dim t As Table = e.Form.Controls("Table1").Table
For Each r1 As Row In t.GetCheckedRows()
    r1("已打印") = True
    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 wrt As New WordReport(Tables("标签创建"),tm,fl1)
    wrt.Build() \'逐行生成报表    
    wrt.Quit() \'退出    
Next

希望对每一行都生成一个独立的WORD标签
但是得到的标签中只有二维码和标签名称是于行对应的,零件号 零件名称 数量等全部获取的是最后一行
附件是标签模板,求教如何修改


 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:物料标签.rar


--  作者:l1q2lq
--  发布时间:2018/10/15 20:21:00
--  
求老师帮忙看看啊
--  作者:有点蓝
--  发布时间:2018/10/15 20:43:00
--  
Dim t As Table = e.Form.Controls("Table1").Table
For Each r1 As Row In t.GetCheckedRows()
    r1("已打印") = True
    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 wrt As New WordReport(Tables("标签创建"),tm,fl1)
    wrt.BuildOne(r1) \'逐行生成报表    
    wrt.Quit() \'退出    
Next