How to make picturebox from form to picturebox rdlc reportviewer vb.net
Imports Microsoft.Reporting.WinForms
Public Class BCPrint
Private Sub BCPrint_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PNJKDCDataSet.tbl_Pat_Image' table. You can move, or remove it, as needed.
Me.tbl_Pat_ImageTableAdapter.Fill(Me.PNJKDCDataSet.tbl_Pat_Image)
'TODO: This line of code loads data into the 'PNJKDCDataSet1.BCPrint' table. You can move, or remove it, as needed.
Me.BCPrintTableAdapter.Fill(Me.PNJKDCDataSet1.BCPrint)
'Try
' Dim Image As New ReportParameter("Image", BC.ImagePictureBox.Image)
' ReportViewer1.LocalReport.SetParameters(Image)
'Catch ex As Exception
' MessageBox.Show(ex.Message)
' End Try
'Try
'Dim saveImage As IO.MemoryStream
'Dim imgByte As Byte()
'If PNJKDCDataSet.Tables.Count > 0 Then
'imgByte = PNJKDCDataSet.Tables(0).Rows(0)("Image")
'saveImage = New IO.MemoryStream(imgByte)
'BC.ImagePictureBox.Image = Image.FromStream(saveImage)
'End If
'Catch ex As Exception
'MessageBox.Show(ex.Message)
'End Try
Dim SeqNo As New ReportParameter("Dt", BC.TextBox1.Text)
ReportViewer1.LocalReport.SetParameters(SeqNo)
Me.ReportViewer1.RefreshReport()
End Sub
End Class
Public Class BCPrint
Private Sub BCPrint_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PNJKDCDataSet.tbl_Pat_Image' table. You can move, or remove it, as needed.
Me.tbl_Pat_ImageTableAdapter.Fill(Me.PNJKDCDataSet.tbl_Pat_Image)
'TODO: This line of code loads data into the 'PNJKDCDataSet1.BCPrint' table. You can move, or remove it, as needed.
Me.BCPrintTableAdapter.Fill(Me.PNJKDCDataSet1.BCPrint)
'Try
' Dim Image As New ReportParameter("Image", BC.ImagePictureBox.Image)
' ReportViewer1.LocalReport.SetParameters(Image)
'Catch ex As Exception
' MessageBox.Show(ex.Message)
' End Try
'Try
'Dim saveImage As IO.MemoryStream
'Dim imgByte As Byte()
'If PNJKDCDataSet.Tables.Count > 0 Then
'imgByte = PNJKDCDataSet.Tables(0).Rows(0)("Image")
'saveImage = New IO.MemoryStream(imgByte)
'BC.ImagePictureBox.Image = Image.FromStream(saveImage)
'End If
'Catch ex As Exception
'MessageBox.Show(ex.Message)
'End Try
Dim SeqNo As New ReportParameter("Dt", BC.TextBox1.Text)
ReportViewer1.LocalReport.SetParameters(SeqNo)
Me.ReportViewer1.RefreshReport()
End Sub
End Class