- Version
- Download 233
- File Size 396.50 KB
- File Count 1
- Create Date March 2, 2016
- Last Updated March 2, 2016
Visual Basic Print Image in Data Report
Visual Basic Print Image in Data Report
This is the sample code in visual basic that will retrieve the path of the picture in the database and print it in the data report of visual basic.
A step by step tutorial and source code is included in the download file.
Sample Code:
'UploadPicture
Private Sub cmdUpload_Click()
If rs.State = adStateOpen Then rs.Close
msql = "Select * from tblPicture"
rs.Open msql, conn
Set DataReport1.DataSource = rs
Set DataReport1.Sections("Section4").Controls.Item("Image1").Picture = LoadPicture(txtpicspath.Text)
DataReport1.Sections("Section4").Controls.Item("Label5").Caption = txtpicsname.Text
DataReport1.Show 1
End Sub