2 l251578524 l251578524 于 2014.01.20 15:14 提问

请问一下在水晶报表中怎么插入二维码

在网上找了一下 http://topic.csdn.net/u/20080306/13/b471356c-d5d8-4914-bfc0-bb5a742b9c1f.html发现了这个
Sub QRCodeSaveRead()
bc1.Type = DotNetBarcode.Types.QRCode
bc1.PrintChar = True

    '保存QRCode图片
     strQRCode = ""
     strQRCode = Trim(txtCode.Text) + " " + _
                         Trim(txtTLot1.Text) + " " + _
                         txtEPack2.Text
     Panel1.Refresh()
     bc1.QRSave(strQRCode, "QRCodeBmp.bmp", 2)

    '读取QRCodeBmp

    Dim fs As New System.IO.FileStream("QRCodeBmp.bmp", IO.FileMode.Open, IO.FileAccess.Read)
     Dim imageDataTemp(fs.Length) As Byte
     ImageData = imageDataTemp
     fs.Read(ImageData, 0, System.Convert.ToInt32(fs.Length))
     fs.Close()
 End Sub

Sub InsertDB(ByVal txtInsertSql As String)
     Dim InSertSql As New System.Text.StringBuilder
     InSertSql.AppendLine(txtInsertSql)
     InSertSql.AppendLine("',Convert(image,@imgQRCode))")
     Dim wblInsertCnn As New SqlConnection(ConnectString)
     Dim wblInsertCmd As New SqlCommand
     Try
         wblInsertCnn.Open()
         wblInsertCmd.Connection = wblInsertCnn
         wblInsertCmd.CommandText = InSertSql.ToString
         Dim wblSP As New SqlParameter("@imgQRCode", SqlDbType.Image)
         wblSP.Value = ImageData
         wblInsertCmd.Parameters.Add(wblSP)
         wblInsertCmd.ExecuteNonQuery()
     Catch ex As Exception
         MessageBox.Show(ex.Message + "插入数据库操作失败!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning)
     Finally
         wblInsertCnn.Dispose()
         wblInsertCmd.Dispose()
     End Try
 End Sub

但是我不知道bc1是个什么控件 有大神解答一下吗

2个回答

l251578524
l251578524   2014.01.20 15:37

有大神知道的 麻烦告知一下

u013886110
u013886110   2015.01.19 17:15

DotNetBarcode bc1 = new DotNetBarcode(DotNetBarcode.Types.QRCode);

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!