By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,400 Members | 953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,400 IT Pros & Developers. It's quick & easy.

Virtual Memory

P: n/a
Ian
I have and Access 97 DB that prints a report that has many pages, sometime
about 800-1000 page, each page contains a colour picture along with text
boxes.

The pictures are displayed on the report but the DB only stores the path to
the picture. On the reports detail sections On Print event I have the code
([ImageFrame].Picture = [ImagePath]). Image path is the field that store the
picture location.

My problem is that when I send this report to the printer, it gets to about
350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance Options.
Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. This
made no difference at all, it still crashes at about page 350 of the Access
report just as it did before the changes.

I tried moving the code to the On Format event, then it flickers the
pictures on the screen for a while as it uses all the virtual memory, then
crashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.
Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Thu, 19 Feb 2004 23:47:56 -0000, Ian wrote:
...
My problem is that when I send this report to the printer, it gets to about
350 pages, then runs out of virtual memory and closes Access.
...


I've had a similar problem in the past on a much lower number of pages and
solved it by replacing the printer driver with an up-to-date version.

Peter

--
No mails please.
Nov 12 '05 #2

P: n/a
"Peter Doering" wrote
My problem is that when I send this
report to the printer, it gets to about
350 pages, then runs out of virtual
memory and closes Access.
I've had a similar problem in the past on
a much lower number of pages and
solved it by replacing the printer driver
with an up-to-date version.


If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

However, in my own experience in this area, the failures occurred with a lot
less than 350 pictures. Still, both suggestions are worth looking into.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #3

P: n/a


Have you tried monitoring the amount of swapfile in use ?

It may be necessary to defragment your disk(s) in order for swapfiles to be able to grow to the sizes you
specify, and several of our customers have reported that a defrag resolved this problem for them.

There have been reports of memory leaks that may affect some approaches to handling images in Access Reports,
but it's not clear if that is the case here. Windows 9x/Me can be more susceptible to such issues, and
you can use the ‘Resource Meter’ on these platforms to see if you are reaching certain limits.

We've been able to generate reports of 1000+ pages with large images using our own image control (even
on Win9x), so it's certainly possible.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Ian" <ia********@ntlworld.com> wrote:
I have and Access 97 DB that prints a report that has many pages, sometime
about 800-1000 page, each page contains a colour picture along with text
boxes.

The pictures are displayed on the report but the DB only stores the path to
the picture. On the reports detail sections On Print event I have the code
([ImageFrame].Picture = [ImagePath]). Image path is the field that store the
picture location.

My problem is that when I send this report to the printer, it gets to about
350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance Options.
Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. This
made no difference at all, it still crashes at about page 350 of the Access
report just as it did before the changes.

I tried moving the code to the On Format event, then it flickers the
pictures on the screen for a while as it uses all the virtual memory, then
crashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.


Nov 12 '05 #4

P: n/a
Ian
I don't suppose I should be involved with any kind of advertising but I just
tried the DBPix and printed 8,000 pages with pictures without any virtual
memory loss. I still have concerns with portability but would like to say
how much I appreciate your help, both of you.
"Exponent" <ex******@hotmail.com> wrote in message news:4035dbed$1@lala...


Have you tried monitoring the amount of swapfile in use ?

It may be necessary to defragment your disk(s) in order for swapfiles to be able to grow to the sizes you specify, and several of our customers have reported that a defrag resolved this problem for them.
There have been reports of memory leaks that may affect some approaches to handling images in Access Reports, but it's not clear if that is the case here. Windows 9x/Me can be more susceptible to such issues, and you can use the 'Resource Meter' on these platforms to see if you are reaching certain limits.
We've been able to generate reports of 1000+ pages with large images using our own image control (even on Win9x), so it's certainly possible.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Ian" <ia********@ntlworld.com> wrote:
I have and Access 97 DB that prints a report that has many pages, sometimeabout 800-1000 page, each page contains a colour picture along with text
boxes.

The pictures are displayed on the report but the DB only stores the path tothe picture. On the reports detail sections On Print event I have the code([ImageFrame].Picture = [ImagePath]). Image path is the field that store thepicture location.

My problem is that when I send this report to the printer, it gets to about350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance Options.
Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. This
made no difference at all, it still crashes at about page 350 of the Accessreport just as it did before the changes.

I tried moving the code to the On Format event, then it flickers the
pictures on the screen for a while as it uses all the virtual memory, thencrashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.

Nov 12 '05 #5

P: n/a
Here are some steps you must follow to eliminate/reduce the error you
are encountering:

1) Defrag your Hard drive. The temp printer output files Access
generates can be very large when they contain images.

2) Make sure the drive you point your Virtual Memory Manager to has
several hundred MB's of free space.

3) If you are still using Win9x then make sure you reboot before
printing.

4) You must turn off the "Loading Image" dialog via the Registry
solution here:
http://www.mvps.org/access/api/api0038.htm

5) Load the Images into the Image control from the Detail Section's
Print event NOT THE FORMAT EVENT.
If you follow the above steps and your Report still fails then here are
a couple of more solutions:

1) Upgrade to the latest version of Windows at the very least. Better
yet, upgrade to Access 2003 as well.
or
2) Use the PrintOUt method to only print out a limited number of pages
at a time. Repeat as required.
or
3) THis solution seems to look after most of the memory issues. At
runtime convert the Images to Bitmap format prior to loading them into
the Image control. Here is some sample code:
From: Stephen Lebans (St***********@mvps.org)
Subject: Re: Images in Reports
View: Complete Thread (18 articles)
Original Format
Newsgroups: microsoft.public.access.reports
Date: 2002-09-16 18:46:39 PST
Bruce I finally got a chance to test your method last night. It helped
but only with the actual printing and not the Print Preview itself.
I was able to print the failed Report directly to the printer or to a
disk printer file so that's great! Don't get me wrong, it's still a good
thing because at least you can print the report!

Unfortunately Acess still runs out of resources when you page back and
forth through Print Preview.
I plan to spend some time onthis issue shortly.
Here is the code I use to convert any Jpeg, Gif, or Metafile into a BMP.
Rather than using one of my API solutions I have cheated and set a
Reference to Standard OLE Types type library in order to get at the
SAVETODISK method. But no ActiveX controls are required
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Private ctr As Long

ctr = ctr + 1

Select Case ctr
Case 1
Me.Image10.Picture = CreateBitmapFile("C:\A.jpg")

Case 2
Me.Image10.Picture = CreateBitmapFile("C:\b.jpg")

Case 3
Me.Image10.Picture = CreateBitmapFile("C:\c.jpg")
ctr = 0

Case Else
ctr = 0

End Select

End Sub

Private Sub Report_Open(Cancel As Integer)
ctr = 0
End Sub
Private Function CreateBitmapFile(fname As String) As String

Dim obj As Object

Set obj = LoadPicture(fname)
If Not IsNull(obj) Then

SavePicture obj, "C:\SL11-52"
DoEvents
End If
CreateBitmapFile = "C:\SL11-52"
Set obj = Nothing

End Function

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Ian" <ia********@ntlworld.com> wrote in message
news:lDzZb.143$8N6.90@newsfe1-win...
I don't suppose I should be involved with any kind of advertising but I just tried the DBPix and printed 8,000 pages with pictures without any virtual memory loss. I still have concerns with portability but would like to say how much I appreciate your help, both of you.
"Exponent" <ex******@hotmail.com> wrote in message news:4035dbed$1@lala...


Have you tried monitoring the amount of swapfile in use ?

It may be necessary to defragment your disk(s) in order for swapfiles to be able to grow to the sizes you
specify, and several of our customers have reported that a defrag
resolved this problem for them.

There have been reports of memory leaks that may affect some
approaches to handling images in Access Reports,
but it's not clear if that is the case here. Windows 9x/Me can be
more susceptible to such issues, and
you can use the 'Resource Meter' on these platforms to see if you
are reaching certain limits.

We've been able to generate reports of 1000+ pages with large images
using our own image control (even
on Win9x), so it's certainly possible.

--
__________________________________________________ _____
http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous

"Ian" <ia********@ntlworld.com> wrote:
I have and Access 97 DB that prints a report that has many pages,
sometimeabout 800-1000 page, each page contains a colour picture along with textboxes.

The pictures are displayed on the report but the DB only stores the path to
the picture. On the reports detail sections On Print event I have
the
code([ImageFrame].Picture = [ImagePath]). Image path is the field that
store
thepicture location.

My problem is that when I send this report to the printer, it gets
to
about350 pages, then runs out of virtual memory and closes Access.

I have tried increasing the Page File Size under the Performance
Options.Was Initial size 786 now set to 1500, Max was 1536 now set to 4000. Thismade no difference at all, it still crashes at about page 350 of the
Accessreport just as it did before the changes.

I tried moving the code to the On Format event, then it flickers
thepictures on the screen for a while as it uses all the virtual
memory, thencrashes before the report opens.

How can I print more than 350 pages?

Any suggestions would be apprecated.



Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.