Solved How to Insert Logo Saved as Attachment on a Report

Pac-Man

Active member
Local time
Today, 09:51
Joined
Apr 14, 2020
Messages
432
Hello,

I need Insert Logo on all reports. Logo is saved as Attachment in a table. How can I Insert this Logo in my reports. I tried using dlookup in control source of an image field but it didn't work.

Best Regards
Abdullah
 
you need to Extract first the image from Attachment.
then assign the path of the image to the Picture property
of the Image control.

see this demo (sampleReport).
see the code on Load event.
see the function PictureFromAttachment, in Module1.
 

Attachments

Can you not save the logo as an image file on your PC/server, and then use that image file (or any other) on your form/report?
 
you need to Extract first the image from Attachment.
then assign the path of the image to the Picture property
of the Image control.

see this demo (sampleReport).
see the code on Load event.
see the function PictureFromAttachment, in Module1.
I'm away from PC right now. I'll check it and then let you know. Thanks for the db.
Best Regards
 
Hi. You have two options:

1. Instead of using an Attachment field, save your logos in the Image gallery, or
2. Use a subreport to display your logos
 
Hi. You have two options:

1. Instead of using an Attachment field, save your logos in the Image gallery, or
2. Use a subreport to display your logos
Thanks for reply @theDBguy, subreport could be used... never thought that way. Thanks a lot.
By image gallery, you mean my PC image gallery or something else? My purpose is if in future I change the logo, I don't have to change on individual reports. Solution provided by @arnelgp works perfectly. I have seen his db now. But Happy to know other method suggested by you by which I could achieve the purpose.
 
you need to Extract first the image from Attachment.
then assign the path of the image to the Picture property
of the Image control.

see this demo (sampleReport).
see the code on Load event.
see the function PictureFromAttachment, in Module1.
Thanks for the db @arnelgp. I have seen the report and module1. It works as I needed. Thanks a lot.
 
goodluck abdullah!
Bismillahirrahmanirrahim!
 
Thanks for reply @theDBguy, subreport could be used... never thought that way. Thanks a lot.
By image gallery, you mean my PC image gallery or something else? My purpose is if in future I change the logo, I don't have to change on individual reports. Solution provided by @arnelgp works perfectly. I have seen his db now. But Happy to know other method suggested by you by which I could achieve the purpose.
Hi. By Image Gallery, I meant this.
1611589106032.png
 
OK. Thanks for image. But by this method I've to change images on all reports of the i need to replace logo.
No, you don't. When you update the Image Gallery, all objects (forms and reports) are automatically updated as well.
 

Users who are viewing this thread

Back
Top Bottom