以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  二维码的生成  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=183855)

--  作者:朱女士
--  发布时间:2022/11/16 11:42:00
--  二维码的生成
老师您好!
   我想用数据表的2个-3个字段组合生成二维码,我想问的问题是:1、能否用汉字字段生成,2、在代码中怎么组合2个及以上字段。3、我存储文件时文件名,用字段内容存储。我写得代码有问题。请指教,谢谢!带颜色的三句。
    Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Dim fn As String
Dim gx As string
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
For Each r As Row In Tables("工序表").Rows
    bar.Code = r("工序代码")
    rg = New prt.RenderGraphics
    bar.DrawOnCanvas(rg.Graphics, 0, 0, 1)
    rg.Style.Spacing.All = 3
    Doc.Body.Children.Add(rg)
    gx = r("工序代码")
    fn = "d:\\工序二维码\\mycode &gx.jpg"
    MessageBox.Show(fn)
    Bar.SaveImage("fn")
Next
Doc.Preview()

 

--  作者:有点蓝
--  发布时间:2022/11/16 11:53:00
--  
多个列:bar.Code = r("工序代码") & r("列2") & r("列3")

fn = "d:\\工序二维码\\mycode\\" & gx & ".jpg"
自己学会查看合成的内容:msgbox(fn)