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

Stephen Lebans Snapshot to PDF solution

P: n/a
Hi

I've copied Stephens code into my db, and can get it to work, but only
on "plain Jane" reports with no images.

Most of my reports has an unbound image obluect in them that I set to
an external image file using on_open code

I've searched through this group and there are a few comments about
snapshots not working with embedded images, and my testing seems to
prove this to be correct.

It there any way to get Stephens solution to create a pdf from a
report that has an image object in it???

Thanks in advance

Grant

Jun 7 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Have you turned off the Loading Image dialog?

If you do not stop the "Loading Image" Dialog via the Registry modification
you will run into two issues:

1) Access can crash if you scroll through the reocrds too fast.
2) When printing a Report, Access may run out of resources and be
unable to complete printing the report.
Additionally, two issues in regards to the Registry modification
pointed to
here http://www.mvps.org/access/api/api0038.htm
1) The Registry key MUST be "No" NOT "no" or "NO"
2) On systems with XP or on systems with more than one user account,
you must add/modify the key in both HKEY_CURRENT_USER and
HKEY_LOCAL_MACHINE.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<gr***@technologyworks.co.nzwrote in message
news:11**********************@r19g2000prf.googlegr oups.com...
Hi

I've copied Stephens code into my db, and can get it to work, but only
on "plain Jane" reports with no images.

Most of my reports has an unbound image obluect in them that I set to
an external image file using on_open code

I've searched through this group and there are a few comments about
snapshots not working with embedded images, and my testing seems to
prove this to be correct.

It there any way to get Stephens solution to create a pdf from a
report that has an image object in it???

Thanks in advance

Grant

Jun 8 '07 #2

P: n/a
Nope, that didnt work

The error message i'm getting is MSAccess2455 You entered that has an
invalid reference to the property form/report

Its getting to this line in your code

DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)", _
strPathandFileName

If I remove the img object form the report its works ok.

Cheers

Grant


On Jun 8, 12:47 pm, "Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdot...@linvalid.comwrote:
Have you turned off the Loading Image dialog?

If you do not stop the "Loading Image" Dialog via the Registry modification
you will run into two issues:

1) Access can crash if you scroll through the reocrds too fast.

2) When printing a Report, Access may run out of resources and be
unable to complete printing the report.

Additionally, two issues in regards to the Registry modification
pointed to
herehttp://www.mvps.org/access/api/api0038.htm

1) The Registry key MUST be "No" NOT "no" or "NO"

2) On systems with XP or on systems with more than one user account,
you must add/modify the key in both HKEY_CURRENT_USER and
HKEY_LOCAL_MACHINE.

--

HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

<g...@technologyworks.co.nzwrote in message

news:11**********************@r19g2000prf.googlegr oups.com...
Hi
I've copied Stephens code into my db, and can get it to work, but only
on "plain Jane" reports with no images.
Most of my reports has an unbound image obluect in them that I set to
an external image file using on_open code
I've searched through this group and there are a few comments about
snapshots not working with embedded images, and my testing seems to
prove this to be correct.
It there any way to get Stephens solution to create a pdf from a
report that has an image object in it???
Thanks in advance
Grant- Hide quoted text -

- Show quoted text -

Jun 11 '07 #3

P: n/a
Forget about my code for a moment. Can you manually export your Report to
Snapshot format?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<gr***@technologyworks.co.nzwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
Nope, that didnt work

The error message i'm getting is MSAccess2455 You entered that has an
invalid reference to the property form/report

Its getting to this line in your code

DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)", _
strPathandFileName

If I remove the img object form the report its works ok.

Cheers

Grant


On Jun 8, 12:47 pm, "Stephen Lebans" <ForEmailGotoMy.WebSite.-
WWWdotlebansdot...@linvalid.comwrote:
>Have you turned off the Loading Image dialog?

If you do not stop the "Loading Image" Dialog via the Registry
modification
you will run into two issues:

1) Access can crash if you scroll through the reocrds too fast.

2) When printing a Report, Access may run out of resources and be
unable to complete printing the report.

Additionally, two issues in regards to the Registry modification
pointed to
herehttp://www.mvps.org/access/api/api0038.htm

1) The Registry key MUST be "No" NOT "no" or "NO"

2) On systems with XP or on systems with more than one user
account,
you must add/modify the key in both HKEY_CURRENT_USER and
HKEY_LOCAL_MACHINE.

--

HTH
Stephen Lebanshttp://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

<g...@technologyworks.co.nzwrote in message

news:11**********************@r19g2000prf.googleg roups.com...
Hi
I've copied Stephens code into my db, and can get it to work, but only
on "plain Jane" reports with no images.
Most of my reports has an unbound image obluect in them that I set to
an external image file using on_open code
I've searched through this group and there are a few comments about
snapshots not working with embedded images, and my testing seems to
prove this to be correct.
It there any way to get Stephens solution to create a pdf from a
report that has an image object in it???
Thanks in advance
Grant- Hide quoted text -

- Show quoted text -


Jun 11 '07 #4

P: n/a
I've just tried and I can create a snapshot from a simple report with
no image controls, but as soon as the report has an image control in
it it bombs out.

I'm using Access97 SR2

ok i've just convered my app to Access XP and your code now works, so
its something to do with my installation of Access97 and the snapshot
export.

The snapshot export capability is standard with the access
installation, but can I download it separately to try re installing
it?

Cheers

Grant

Jun 12 '07 #5

P: n/a
Are you using an Image control or a Bound/Unbound OLE Frame control?
Are you loading the Image control at runtime or embedding the image(s) at
design time?

When I asked you earlier if you had turned off the Loading Image dialog what
was your response?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<gr***@technologyworks.co.nzwrote in message
news:11*********************@i13g2000prf.googlegro ups.com...
I've just tried and I can create a snapshot from a simple report with
no image controls, but as soon as the report has an image control in
it it bombs out.

I'm using Access97 SR2

ok i've just convered my app to Access XP and your code now works, so
its something to do with my installation of Access97 and the snapshot
export.

The snapshot export capability is standard with the access
installation, but can I download it separately to try re installing
it?

Cheers

Grant

Jun 12 '07 #6

P: n/a
A quick search on GoogleGroups yielded the following:

Here's a post of mine from a couple of months ag0.

>Forum: microsoft.public.access.reports
Thread: INFO: Export to SnapShot Image memory restrictions
Message 1 of 4

Save this thread

back to search results
Subject: INFO: Export to SnapShot Image memory restrictions
Date: 10/12/2000
Author: Stephen Lebans <StephenNoS...@lebans.com>
<< previous next in search >>
RE: Export to SnapShot Format: Win98/A97 Win95/A97
In some very basic testing it would appear there is a memory restriction
of just under 1MB for the total amount of memory allowed for Images in a
Report to be exported to SnapShot format for each page. On the two A97
systems here at home the value is actually around 1011KB. This value is
the uncompressed bitmap(s) or DDB(s).
If you exceed this amount the Export process silently fails. If you come
close to this amount sometimes the SnapShot file is created but it will
appear to be missing sections of the Report. This value decreases as
other controls are added to the Report, and not just Image controls.
I have tried both Bitmap and Metafiles with exactly same results.
To easily test this create 2 Bitmap images with file sizes of 1000KB and
1024KB. Create a Blank Report with no recordsource and no Controls on
it. Set the 1000KB Image as the Background picture of the Report. Export
this to SnapShot format and then view the result with the SnapShot
viewer. Now try it with the 1024KB Bitmap and the Export should fail. In
fact if you keep the same filename as the original 1000KB Snapshot you
will now find the export not only failed but it deleted your first
SnapShot as well.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<gr***@technologyworks.co.nzwrote in message
news:11*********************@i13g2000prf.googlegro ups.com...
I've just tried and I can create a snapshot from a simple report with
no image controls, but as soon as the report has an image control in
it it bombs out.

I'm using Access97 SR2

ok i've just convered my app to Access XP and your code now works, so
its something to do with my installation of Access97 and the snapshot
export.

The snapshot export capability is standard with the access
installation, but can I download it separately to try re installing
it?

Cheers

Grant

Jun 12 '07 #7

P: n/a
ok your quite right, it is a memory issue, if Icut the image size down
it works. I though a jpg would have solved the problem, but makes no
diff, so assume the snapshot format must uncompress the jpg so uses up
just as much memory.

Now just have to figure out how to reduce my image size!@#

Thanks

Grant

Jun 19 '07 #8

P: n/a
The Snapshot file will contain an uncompressed DIB(bitmap) wrapped within an
Enhanced Metafile.
You really should upgrade the A97 system to at least A2K.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<gr***@technologyworks.co.nzwrote in message
news:11*********************@q19g2000prn.googlegro ups.com...
ok your quite right, it is a memory issue, if Icut the image size down
it works. I though a jpg would have solved the problem, but makes no
diff, so assume the snapshot format must uncompress the jpg so uses up
just as much memory.

Now just have to figure out how to reduce my image size!@#

Thanks

Grant

Jun 20 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.