Speeding up preview/printing of report with Images

G

Guest

Hi. I have a report that produces up to 15 images per page and contains
typically 90 images over all. When I preview it, it seems to go through the
process of loading all the images first, then shows page 1. When I go to page
two, it seems to load the images for that page all over again. This seems
very slow. Similarly, printing seems to be slow when printing only one page
because it appears to load all images first, then those for the page in
question. I've already reduced the size of the images to around 60Mb each but
I suppose I could reduce them further.

But I wonder, is there any way to get access to load up only those images
for page 1, then load the images for other pages only when they are selected
for preview or printing?

The code to show the images in the detail section of the report is as follows:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Me.txtImagePathAndFile <> vbNullString Then
Me.imgTheImage.Picture = PathName & Me.txtImagePathAndFile
Me.imgTheImage.Visible = True
Else
Me.imgTheImage.Visible = False
End If

End Sub

Thanks for any help, JohnB
 
G

Guest

Whooa - I've just answered my own question. I moved the code to the On Print
event and it loads only those images for the page selected, which is exactly
what I want. Sorry if I wasted anyones time. Cheers, JohnB
 

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