Hi All,

I want to access rptImageControl at runtime to change the image displayed in the control. Is it possible? I'm getting error "Object does not support this method". Also how to display the image from the database on rptImageControl?

10 Years
Discussion Span
Last Post by mohammad2700

Dear Thread,

rptimage placed in data report are not accessible directly(infact all report controls are accessed indirectly).you declare rptimage control in your code. set it to the rptimage on data report using it's control no.say 1 :if you placed it first on that section of report.as

dim tmpimg as rptimage.

set tmpimg=rptreport.sections(1).controls(1)
'here rptreport is name of ur report and section 1 is header section,control 1 refers to rptimage 'control to display your image on report

set tmpimg.picture=loadpicture("path of saved image")

'now give required ht and position of picture in the header section

'Alternatively' you can directly access image from your graph if you have not unloaded the form 'having graph as

set tmpimg.picture=frmgraph.graph.controlimage

'this works fine with my project if you have problem you are welcome for further query.

all the best.

mohammad ghamari

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.