[RESOLVED] How to dynamically load pictures in datareport Using VB Coding?
Hi,
How to dynamically load pictures in datareport Using VB Coding?. I wish to have the picture in the data report say as a logo. I wish to print the logo based on the input given. But, the following is not exectuted:
VB Code:
drsalbl.Sections(2).Controls("img").Picture = loadpicture(App.Path + "\LH1.jpg")
Because the Image control on datareport does not support to change the picture on run time.
Is any thing mistake in my approach? or
Is there any other way to accomplish the above thing?
Please help me.
Re: How to dynamically load pictures in datareport Using VB Coding?
You are very close - Picture property is an Object so it has to be Set.
Also, try not to use indexes but rather names when accessing Sections/Controls/etc...
VB Code:
Private Sub DataReport_Initialize()
Set Me.Sections("SectionHeader").Controls("Image1").Picture = LoadPicture(App.Path & "\LH1.jpg")
End Sub
Re: How to dynamically load pictures in datareport Using VB Coding?
Re: How to dynamically load pictures in datareport Using VB Coding?
Re: [RESOLVED] How to dynamically load pictures in datareport Using VB Coding?