Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very slow report

Status
Not open for further replies.

weeze2

Technical User
Jun 18, 2002
129
DK
HI there

I have this report that shows pictures. The pictures are linked and there is over 800 of them. They are about 10KB each(jpg).
In the format event of the detail section I have the following code

Me!Picture.Picture = "Q:/xxx/xxx/" + Me!txtPicture + ".jpg"

txtPicture is the textbox that holds the link value stores in the DB.

My problem is that the report is very slow and it takes about 10min and sometimes the pc runs out of viryuel memory.
It is much slower than when I used OLE-objects instead of linked pictures.
Is there a problem with the report or the way I do it?
 
You're printing a report with 800 10KB pictures on it? Hold on, I wanna go buy some stock in Toner and Ink Cartridge companies.. :)

Running out of virtual memory is indeed one of your hurdles - I don't think Access's report generation process is all that efficient, it probably (and please if anyone knows better, correct us) attempts to build damn near the entire report all at once, spooling within the database or in the page file.

Is there anyway you can cut down the size of the images? Even though 10K might not seem like a lot, 800 of 'em in one report..? An 8 mb report is going to fill up your free RAM pretty fast..

Assuming you still need to print all 800 images, you may have to split this into three or four passes, and then combine all that paper into one.

I have never been a fan of Access's handling of OLE and binary objects - it may be worth investigating a product specifically designed for this.

Hope this rather sparse assistance is of some help.

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Hi,
I haven't tried this, but here is a strategy that may help. Using the OnPrint event for the section that contains the pictues, use the LoadPicture function to retrieve the image and insert it into the report. If I had a little bit more time, I would experiment with this and then let you know the results. So, can you time the first report, and then try my strategy to see if it improves?
HTH, [pc2]
Randy Smith
California Teachers Association
 
Hi there

Thanks
If you put the
Me!Picture.Picture = "Q:/xxx/xxx/" + Me!txtPicture + ".jpg" in onPrint instead og onFormat, It seems to load the pictures from a page only when focusing on a certain page.

Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top