laveshverma
asked on
gaining Access to image control in data report
Hello Sir,
I want to display image in data report at run time where the name of image will be given by user.I had used the string like..
avgRating.Sections("sectio n2").Contr ols.Item(" image1").P icture = "d:\tpf\av.bmp"
but its not working.It is hsowing the error.
Please tell me how to display the image in data report.
Regards,
I want to display image in data report at run time where the name of image will be given by user.I had used the string like..
avgRating.Sections("sectio
but its not working.It is hsowing the error.
Please tell me how to display the image in data report.
Regards,
What is "the error" that is showing?
Try to use the control's name directly. If we have Imag1 control, then
In format event,
Image1.Picture = "d:\tpf\av.bmp"
In format event,
Image1.Picture = "d:\tpf\av.bmp"
ASKER
To Mr. LSMConsulting,
Sir I had used the following statement-
avgRating.Sections("sectio n2").Contr ols.Item(" image1").P icture = LoadPicture("d:\tpf\av.bmp ")
But it is showing the error as:
"Object doesnt support this property or method"
How this error can be removed?
Sir I had used the following statement-
avgRating.Sections("sectio
But it is showing the error as:
"Object doesnt support this property or method"
How this error can be removed?
ASKER
To hnasr,
sir where this code should be written?, I am accessing the data report thru vb form . If i write the code in vb form , it show the error cuase the control " image1" is a contorl of report, not of form.
So how to correct this error?
sir where this code should be written?, I am accessing the data report thru vb form . If i write the code in vb form , it show the error cuase the control " image1" is a contorl of report, not of form.
So how to correct this error?
You don't use LoadPicture for this, just set the .Picture property to the full path to your image, as hnasr has shown you. You would obviously need to refer to your control correctly, as you seem to have done here:
avgRating.Sections("sectio n2").Contr ols.Item(" image1").P icture = "d:\tpf\av.bmp"
avgRating.Sections("sectio
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
To LSMConsulting,
Sir I had tried the syntax given by you also, But it is also showing the saem error as " Oject doesnt support this property or method"
Sir I had tried the syntax given by you also, But it is also showing the saem error as " Oject doesnt support this property or method"