代码这样写,引用的时候,名字不能一样
If e.Book.TempLate = "终检FQC检验清单" Then
If e.region = "衰减器订单执行统计表" 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\BarCode1.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code128
Bar.Code = e.DataRow("晨信工单")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\BarCode1.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\BarCode2.gif")
Else '否则生成条形码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code128
Bar.Code = e.DataRow("短文本")
Bar.BarRatio = 0.3
Bar.BarHeight = 8
bar.SaveImage(ProjectPath & "Images\BarCode2.gif",300)
End If
End If
End If