罗威严 2014-01-20 07:14 采纳率: 0%
浏览 7412

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

在网上找了一下 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条回答 默认 最新

  • 罗威严 2014-01-20 07:37
    关注

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

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料