How to dynamically resize images in reports?

perlfan

Registered User.
Local time
Today, 13:13
Joined
May 26, 2009
Messages
192
Hi there,

I have an application where users can indicate a url to their logo stored online.
When they open a report (invoice, quote) that logo gets displayed in an image frame (online image gets stored in a temp folder before that).

Now I would like the image frame to adapt to the actual image size which, of course, always varies from user to user.
I tried the fResizeImageFrame function from this post...
http://www.access-programmers.co.uk/forums/showthread.php?t=110252
...but it doesn't work. Images do not get properly displayed (e.g. as I see them when I open the image in an image viewer).
This is the code in the report:
Code:
     Me.Bild129.Picture = di
     Call fResizeImageFrame(Me.Bild129)

Has someone successfully implemented this? BTW: I am working with Access2007. But I suppose that the function etc. should work as well with the 07 version.
Thanks for help! Frank
 
What you have to realise is an Image Control does not have a Can Grow. The only way to get around this - is knowing (storing) the size of the logo and resizing the ImageControl depending upon the dimensions of the image. You may have to play around with twips.

Simon
 
Hi Simon - I get the image dimensions via picHgt = ctl.ImageHeight picWdt = ctl.ImageWidth. The image control should alter its size according to the widths and lengths, which is not working. Sorry - but I don't really get your point (Image Control does not have a Can Grow). Thanks for clarification - FRANK
 
Hi Frank,

Post an example of Database, Access 2003 or 2007 I will have a look. Don't worry about logos I have plenty.

Simon
 

Users who are viewing this thread

Back
Top Bottom