版主,您好!通过建立设备台账表,又建立标签打印模版,想将设备相关信息生产二维码,请见附件,主要是涉及报表事件代码不知道怎么编写!请告知,谢谢!附件中有设备台账图片、设备二维码标签打印模版代码编辑图片,设备二维码标签实物图片,目前我只有能力将资产名称打印成二维码,不包含上述所有的信息,我想版主告知我如何将标签上的所有信息都打印在二维码中,报表事件中编码如下,请赐教,谢谢!
If e.Book.TempLate = "二维码设备标签打印" Then
If e.region = "制造三部固定资产台账" Then
If e.DataRow Is Nothing OrElse e.DataRow.IsNull("资产名称") Then '如果是空行或者Lot列为空
此主题相关图片如下:标签实际图片.png
Dim img As New System.Drawing.Bitmap(1,1) '生成一个空白图片
img.Save(ProjectPath & "Images\QRCode1.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = e.DataRow("资产名称")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\QRCode1.gif",300)
End If
If e.DataRow Is Nothing OrElse e.DataRow.IsNull("资产名称") Then '如果是空行或者Lot列为空
Dim img As New System.Drawing.Bitmap(1,1) '生成一个空白图片
img.Save(ProjectPath & "Images\QRCode2.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = e.DataRow("资产名称")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\QRCode2.gif",300)
End If
If e.DataRow Is Nothing OrElse e.DataRow.IsNull("资产名称") Then '如果是空行或者Lot列为空
Dim img As New System.Drawing.Bitmap(1,1) '生成一个空白图片
img.Save(ProjectPath & "Images\QRCode3.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = e.DataRow("资产名称")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\QRCode3.gif",300)
End If
If e.DataRow Is Nothing OrElse e.DataRow.IsNull("资产名称") Then '如果是空行或者Lot列为空
Dim img As New System.Drawing.Bitmap(1,1) '生成一个空白图片
img.Save(ProjectPath & "Images\QRCode4.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = e.DataRow("资产名称")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\QRCode4.gif",300)
End If
If e.DataRow Is Nothing OrElse e.DataRow.IsNull("资产名称") Then '如果是空行或者Lot列为空
Dim img As New System.Drawing.Bitmap(1,1) '生成一个空白图片
img.Save(ProjectPath & "Images\QRCode5.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = e.DataRow("资产名称")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\QRCode5.gif",300)
End If
If e.DataRow Is Nothing OrElse e.DataRow.IsNull("资产名称") Then '如果是空行或者Lot列为空
Dim img As New System.Drawing.Bitmap(1,1) '生成一个空白图片
img.Save(ProjectPath & "Images\QRCode6.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = e.DataRow("资产名称")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\QRCode6.gif",300)
End If
End If
End If