以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 关于EXCEL打印生成二维码扫码结果错误 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=153524) |
||||||||
-- 作者:hnguang -- 发布时间:2020/8/14 8:41:00 -- 关于EXCEL打印生成二维码扫码结果错误
If e.Book.TempLate = "物料二维码打印" Then If e.region = "P包装条码明细" Then If e.DataRow Is Nothing OrElse e.DataRow.IsNull("二维码") Then \'如果是空行或者Lot列为空 Dim img As New System.Drawing.Bitmap(1,1) \'生成一个空白图片 img.Save(ProjectPath & "Images\\BarCode.gif") img.Save(ProjectPath & "Images\\BarCode1.gif") Else \'否则生成条形码图片 Dim Bar As New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode Dim size As String size = e.DataRow("二维码") \'size += "," & e.DataRow("发料数量") Bar.Code = size Bar.BarRatio = 0.3 Bar.BarHeight = 8 bar.SaveImage(ProjectPath & "Images\\BarCode.gif",300) Dim idx As Integer = Tables("P包装条码明细").FindRow(e.DataRow) If idx > -1 AndAlso idx < Tables("P包装条码明细").Rows.Count Dim r As Row = Tables("P包装条码明细").Rows(idx+1) Bar = New BarCodeBuilder Bar.Symbology = Barpro.Symbology.QRCode Dim size1 As String size1 = r("二维码") \'size += "," & e.DataRow("发料数量") Bar.Code = size1 Bar.BarRatio = 0.3 Bar.BarHeight = 8 bar.SaveImage(ProjectPath & "Images\\BarCode1.gif",300) End If End If End If End If 这是用EXCEL模板生成的二维码,两栏,发现第二栏生成的二维码很多扫出来结果不一样
|
||||||||
-- 作者:有点蓝 -- 发布时间:2020/8/14 8:56:00 -- 应该是串行了,上传实例测试一下 |