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

在网上找了一下 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是个什么控件 有大神解答一下吗

查看全部
l251578524
罗威严
2014/01/20 07:14
  • 水晶报表 二维码
  • 点赞
  • 收藏
  • 回答
    私信

2个回复