Images on reports

V

Vayse

Hi
I have to do a report, where there are several images in sub reports. These
images depend on the Client.
So in the detail format section of the report I have

If IsNull(Me.Photograph) Then
Me.imgPhoto.Picture = BLANK_PHOTO ' Default photo
Else
Me.imgPhoto.Picture = Me.Photograph ' Path to the Photo
End If

Some sub reports don't need a default photo, so in those cases I just do
Me.ImgPhoto.visiblle = False

There are two areas I'd like to improve

1) Speed
It can be slow to load and print.
To speed things up, I used the following code:

If Not bPhotoLoaded Then
If IsNull(Me.Photograph) Then
Me.imgPhoto.Picture = BLANK_PHOTO
Else
Me.imgPhoto.Picture = Me.Photograph
End If
bPhotoLoaded = True
End If

Which works fine for the sub reports where the photo is only loaded once.
However, for example on Client contacts, I want the photo to load for each
contact.
In cases where the photo is in the detail section - is there anyway to stop
the photo having to be loaded each time?
The photo load seems to happen when each recordselector is clicked, and on
printing.

2) Crashing Out
Say the user is a page 16. Then he goes back to page 15. All is fine, he
just waits for the photo to load. If however the user is impatient, and
clicks back to page 14 before the photo is loaded, then access will hang.
Anyway around this?


The photos themselves are usually around 100k in size. I have the picture
type set as linked.
Any advice welcome.
Thanks
Vayse
 
B

Bill

Fayse,
I can't reproduce your "crash" on a 2003 system. I have a
report with 12 images per page. There is a nominal delay
as I go from one page to the next, but once a page is
loaded, I can go back in the page sequence as fast as I
can click on the "back-page" arrow. I.e., the images do
not reload.

I don't use the OLE type control. Rather I superimpose
an unbounded image control on top of an OLEbound
and set the path (Picture property) in code for the link.

Not sure this adequately addresses you situation, but
might be of some help.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top