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?
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?
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
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.