I am trying to assign an image file (.jpg and .emf) to an image control that I have on a VB6 Datareport. From the MSDN help files I've seen, there is not a lot of info. Primarily, they say it is similar to the normal Visual Basic image control. When I run the code using the same syntax, I get an error "Runtime error 438 - Object does not support this property or method". See example below. The error is thown on the ".Sections("Section1")...." line.
How can I get this to display an image on the datareport at runtime?
example:
With rptAdvLQProcessSht
.Sections("Section1").Controls("imgDpaMount").Picture = Loadpicture("C:\Documents and Settings\shumaker\My Documents\Downloads\relotqualprocesssheet\DPA-Ingenio.emf")
End With
rptAdvLQProcessSht.Show vbModal
How can I get this to display an image on the datareport at runtime?
example:
With rptAdvLQProcessSht
.Sections("Section1").Controls("imgDpaMount").Picture = Loadpicture("C:\Documents and Settings\shumaker\My Documents\Downloads\relotqualprocesssheet\DPA-Ingenio.emf")
End With
rptAdvLQProcessSht.Show vbModal