Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning a jpg or emf file to VB6 Datareport Image Control at runtime

Status
Not open for further replies.

CruiseMan

Programmer
Nov 17, 2006
29
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top