以文本方式查看主题 - 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=108479) |
-- 作者:李孝春 -- 发布时间:2017/10/23 18:51:00 -- 【二维码】下面条件将所有分册编号的二维码全部生成出来了 有没有办法只生成符合某个条件的二维码记录呢? 下面代码是将当前表所有分册编号的全部生成报表出来了 有没有办法加上一个条件使之只生成当前【卷宗编号】的二维码记录表呢? Dim doc As New PrintDoc Dim rg As prt.RenderGraphics Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode 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 = 1 Doc.Body.Children.Add(rg) Next Doc.Preview() 自行修改为下面的代码 初步可以实现效果【不知道是否有更好的办法呢?】 Dim ab As Row = Tables("卷宗入库").Current Dim doc As New PrintDoc Dim rg As prt.RenderGraphics Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight For Each r As Row In Tables("入库明细").Rows If r("卷宗编号")=ab("卷宗编号") Then bar.Code = r("分册编号") rg = new prt.RenderGraphics bar.DrawOnCanvas(rg.Graphics,0,0,1) rg.Style.Spacing.All = 1 Doc.Body.Children.Add(rg) End If Next Doc.Preview() |
-- 作者:有点蓝 -- 发布时间:2017/10/23 20:22:00 -- If Tables("卷宗入库").Current IsNot Nothing Then Tables("入库明细").Filter = "卷宗编号 = \'" & Tables("卷宗入库").Current("卷宗编号") & "\'" Dim doc As New PrintDoc Dim rg As prt.RenderGraphics Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode 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 = 1 Doc.Body.Children.Add(rg) Next Doc.Preview() End If
|
-- 作者:李孝春 -- 发布时间:2017/10/23 21:25:00 -- 回复:(有点蓝)If Tables("卷宗入库").Current IsNo... 谢谢 有没有调整生成的二维码的大小呢? 默认A4纸张 图片太大
[此贴子已经被作者于2017/10/23 21:47:42编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/10/23 22:05:00 -- http://www.foxtable.com/webhelp/scr/2090.htm bar.DrawOnCanvas(rg.Graphics,0,0,0.5)
|