Output Report To Snapshot Via Code 
Author Message
 Output Report To Snapshot Via Code

Does anybody have any code (if it Is it possible, that is) to output a
report as a snapshot file entirely via code, not using macros?
--
Pete B



Sat, 08 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Yes, you can do this.  Have you ever noticed that the format constants are
strings? For example:

    acFormatRTF = "Rich Text Format (*.rtf)"

This string matches part of the value in the registry under:

HKLM\Software\Microsoft\Office\8.0\Access\Report Formats

You can output snapshots by putting the literal string:

    "Snapshot Format (*.snp)"

in your DoCmd.OutputTo statement.

Michael

Quote:

>Does anybody have any code (if it Is it possible, that is) to output a
>report as a snapshot file entirely via code, not using macros?
>--
>Pete B



Sat, 08 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Thanks, Michael.  I received several replies saying this same thing.  It
was the lack of a predefined constant that had me in doubt, but I suspected
it might be something like that.  I am told the same thing will work with
the SendObject statement as well.

I am going to give it a try, solves a big problem for me!
--
Pete B



Quote:
> Yes, you can do this.  Have you ever noticed that the format constants
are
> strings? For example:

>     acFormatRTF = "Rich Text Format (*.rtf)"

> This string matches part of the value in the registry under:

> HKLM\Software\Microsoft\Office\8.0\Access\Report Formats

> You can output snapshots by putting the literal string:

>     "Snapshot Format (*.snp)"

> in your DoCmd.OutputTo statement.

> Michael


> >Does anybody have any code (if it Is it possible, that is) to output a
> >report as a snapshot file entirely via code, not using macros?
> >--
> >Pete B



Sun, 09 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Quote:

>Thanks, Michael.  I received several replies saying this same thing.  It
>was the lack of a predefined constant that had me in doubt, but I suspected
>it might be something like that.  I am told the same thing will work with
>the SendObject statement as well.

>I am going to give it a try, solves a big problem for me!
>--

The real question Pete is why much with snapshots at all, rather than using
a real portable document format like Adobe Acrobat.......These can be
automated through code as well.

Steve Arbaugh
ATTAC Consulting Group
web: http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
To reply, remove ~ and nospm from address



Sun, 09 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Hmmm... lets see...

1) snapshots are built into the EXE
2) They use a compressed metafile that is identical to print preview for the
report so you get the exact design you wanted with no extra work
3) The viewer is free and can be used by people who do not have Access and
is a much smaller install package then Abode's viewer
4) It is automatically integrated into SendObject and OutputTo for code and
macros

Seems like good reasons to me. :-)

Michael

Quote:


>>Thanks, Michael.  I received several replies saying this same thing.  It
>>was the lack of a predefined constant that had me in doubt, but I
suspected
>>it might be something like that.  I am told the same thing will work with
>>the SendObject statement as well.

>>I am going to give it a try, solves a big problem for me!
>>--

>The real question Pete is why much with snapshots at all, rather than using
>a real portable document format like Adobe Acrobat.......These can be
>automated through code as well.

>Steve Arbaugh
>ATTAC Consulting Group
>web: http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
>To reply, remove ~ and nospm from address




Sun, 09 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

The REAL answer, Steve, in addition to Michael Kaplan's excellent reasons,
is that Adobe charged me about $300 for ONE license for the PDF Writer to
produce Adobe-format .pdf files, which is the only way you can get those
files from an Access report for reading with the Adobe viewer.  The Access
or Office Service Release throws that function in at no charge for everyone
that gets it.  And since the process operates almost identically to Acrobat
(what a coincidence, imagine that... wonder if it had anything to do with
the drastic price reduction for Acrobat <g>), now everybody that runs my
app can produce files of reports that they can attach to an email, instead
of me being the only person able to do so in my department.

Furthermore, this process is built in to Access, so I do not have to change
print drivers to produce the files, like you have to do with Adobe.  I will
admit, though, that it is limited to ONLY Access, whereas Adobe works
everywhere, in fact our company publishes a lot of company info
(organization charts, etc) in the PDF format so that everybody in the
company can view/print them in the original mode.  But then, I can just
embed the same thing in an Access report now and do it for free.
--
Pete B



Quote:

> >Thanks, Michael.  I received several replies saying this same thing.  It
> >was the lack of a predefined constant that had me in doubt, but I
suspected
> >it might be something like that.  I am told the same thing will work
with
> >the SendObject statement as well.

> >I am going to give it a try, solves a big problem for me!
> >--

> The real question Pete is why much with snapshots at all, rather than
using
> a real portable document format like Adobe Acrobat.......These can be
> automated through code as well.

> Steve Arbaugh
> ATTAC Consulting Group
> web: http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
> To reply, remove ~ and nospm from address




Mon, 10 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Michael
As my other posts state, I really appreciate your help.  I have one more
problem in this that maybe you can help.  Now that I know how to produce
the files via code (your answer worked perfectly) it occurred to me that it
would be messy to try it on a machine that did not have the capability
installed.  So I looked for a way to detect whether the snapshot production
capability was installed.
Figured out that checking for one of the values, such as "ReportFormat" of
the registry key
"SOFTWARE\Microsoft\Office\8.0\Access\Jet\3.5\ISAM Formats\Snapshot Format"
is one way to find out if Snapshot is installed.  For example, that value
of the key should contain the string "Snapshot Format"; if it isn't there
(ie if not installed), you get a null for the key.

Works good as far as I can tell, I can check for that key and disable the
snapshot format option when the form opens if it is not present.  But I am
wondering if this is the best way to do this, for example, I know there is
an ocx, snapshot.ocx, that gets installed for the viewer, but is it also
used to produce the reports.  If so, I could check for that file, if it is
not there, then I could assume no snapshot capability.  But if it is used
only for the viewer, then that will not work.  And I do not know what gets
put in the registry if you install the viewer only.

I guess what I need is the "signature" that identifies this function.  Any
ideas?

--
Pete B



Quote:
> Yes, you can do this.  Have you ever noticed that the format constants
are
> strings? For example:

>     acFormatRTF = "Rich Text Format (*.rtf)"

> This string matches part of the value in the registry under:

> HKLM\Software\Microsoft\Office\8.0\Access\Report Formats

> You can output snapshots by putting the literal string:

>     "Snapshot Format (*.snp)"

> in your DoCmd.OutputTo statement.

> Michael


> >Does anybody have any code (if it Is it possible, that is) to output a
> >report as a snapshot file entirely via code, not using macros?
> >--
> >Pete B



Mon, 10 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Quote:

>Hmmm... lets see...

>1) snapshots are built into the EXE
>2) They use a compressed metafile that is identical to print preview for
the
>report so you get the exact design you wanted with no extra work
>3) The viewer is free and can be used by people who do not have Access and
>is a much smaller install package then Abode's viewer
>4) It is automatically integrated into SendObject and OutputTo for code and
>macros

>Seems like good reasons to me. :-)

>Michael

Mike I agree that for a free app, its a pretty good answer, and the
integration makes it fairly easy.  But the problem I see is that MS went
half baked on it.  You can't read a snapshot on Win 3.1 machines, MAC
machines or U Boxes.  That cuts out a heck of  a lot of e-mail or other
recipients.  A large number of users already have Acrobat installed, so why
add another viewer (like the word viewer, excel viewer, ppoint viewer etc.)
seems to get a bit rediculous after a while.  And (although you wouldn't
expect MS to retro fit,) there's no solution for all the A95 or A2 users
still out there.  That's why we still recommend Acrobat.

Heck if MS had just fixed the rtf export so that it supported report graphic
elements for import into Word, in most instances the snapshot would be
superflous. <BG>

Steve Arbaugh
ATTAC Consulting Group



Mon, 10 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Well, I never consider an unimplemented feature to be something that is
"broken", so I never really look at Access OutputTo RTF support as being
broken, myself....

Michael

Quote:


>>Hmmm... lets see...

>>1) snapshots are built into the EXE
>>2) They use a compressed metafile that is identical to print preview for
>the
>>report so you get the exact design you wanted with no extra work
>>3) The viewer is free and can be used by people who do not have Access and
>>is a much smaller install package then Abode's viewer
>>4) It is automatically integrated into SendObject and OutputTo for code
and
>>macros

>>Seems like good reasons to me. :-)

>>Michael

>Mike I agree that for a free app, its a pretty good answer, and the
>integration makes it fairly easy.  But the problem I see is that MS went
>half baked on it.  You can't read a snapshot on Win 3.1 machines, MAC
>machines or U Boxes.  That cuts out a heck of  a lot of e-mail or other
>recipients.  A large number of users already have Acrobat installed, so why
>add another viewer (like the word viewer, excel viewer, ppoint viewer etc.)
>seems to get a bit rediculous after a while.  And (although you wouldn't
>expect MS to retro fit,) there's no solution for all the A95 or A2 users
>still out there.  That's why we still recommend Acrobat.

>Heck if MS had just fixed the rtf export so that it supported report
graphic
>elements for import into Word, in most instances the snapshot would be
>superflous. <BG>

>Steve Arbaugh
>ATTAC Consulting Group



Tue, 11 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

None of those users you refer to, with early versions of Win, etc., can
export anything to a PDF file unless they buy the Acrobat PDF Writer.
Everybody that owns MS Office97 and installs the free SR can do the
equivalent operation for free.

Sounds like you need to convince MS to buy Adobe and then have them give
away Acrobat for free, then you will get what you want.  Me, I'll settle
for this.
--
Pete B



Quote:


> >Hmmm... lets see...

> >1) snapshots are built into the EXE
> >2) They use a compressed metafile that is identical to print preview for
> the
> >report so you get the exact design you wanted with no extra work
> >3) The viewer is free and can be used by people who do not have Access
and
> >is a much smaller install package then Abode's viewer
> >4) It is automatically integrated into SendObject and OutputTo for code
and
> >macros

> >Seems like good reasons to me. :-)

> >Michael

> Mike I agree that for a free app, its a pretty good answer, and the
> integration makes it fairly easy.  But the problem I see is that MS went
> half baked on it.  You can't read a snapshot on Win 3.1 machines, MAC
> machines or U Boxes.  That cuts out a heck of  a lot of e-mail or other
> recipients.  A large number of users already have Acrobat installed, so
why
> add another viewer (like the word viewer, excel viewer, ppoint viewer
etc.)
> seems to get a bit rediculous after a while.  And (although you wouldn't
> expect MS to retro fit,) there's no solution for all the A95 or A2 users
> still out there.  That's why we still recommend Acrobat.

> Heck if MS had just fixed the rtf export so that it supported report
graphic
> elements for import into Word, in most instances the snapshot would be
> superflous. <BG>

> Steve Arbaugh
> ATTAC Consulting Group



Tue, 11 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Thanks, Michael.  I think I will stick with the registry key, works great
as far as I can tell.  I do not have much faith that the exe file version
number will remain unchanged.  You confirmed what I thought about the ocx.
--
Pete B



Quote:
> I would not rely on the snapshot OCX to determine this... there are
really
> two separate and independent features here:

> 1) The MSACCESS.EXE that comes with SR1 can generate snapshot files. The
> viewer and the ocx do not have to be installed.
> 2) The viewer and the OCX can be used to view these files in any app,
> including Access (non-SR1) or even Access 95, because they do not need
the
> code to generate these files....

> I think your best bet for determining whether or not to try to generate
> these files is to either get the version # for msaccess.exe or the report
> formats reg key.

> Michael


> >Michael
> >As my other posts state, I really appreciate your help.  I have one more
> >problem in this that maybe you can help.  Now that I know how to produce
> >the files via code (your answer worked perfectly) it occurred to me that
it
> >would be messy to try it on a machine that did not have the capability
> >installed.  So I looked for a way to detect whether the snapshot
production
> >capability was installed.
> >Figured out that checking for one of the values, such as "ReportFormat"
of
> >the registry key
> >"SOFTWARE\Microsoft\Office\8.0\Access\Jet\3.5\ISAM Formats\Snapshot
Format"
> >is one way to find out if Snapshot is installed.  For example, that
value
> >of the key should contain the string "Snapshot Format"; if it isn't
there
> >(ie if not installed), you get a null for the key.

> >Works good as far as I can tell, I can check for that key and disable
the
> >snapshot format option when the form opens if it is not present.  But I
am
> >wondering if this is the best way to do this, for example, I know there
is
> >an ocx, snapshot.ocx, that gets installed for the viewer, but is it also
> >used to produce the reports.  If so, I could check for that file, if it
is
> >not there, then I could assume no snapshot capability.  But if it is
used
> >only for the viewer, then that will not work.  And I do not know what
gets
> >put in the registry if you install the viewer only.

> >I guess what I need is the "signature" that identifies this function.
Any
> >ideas?

> >--
> >Pete B



> >> Yes, you can do this.  Have you ever noticed that the format constants
> >are
> >> strings? For example:

> >>     acFormatRTF = "Rich Text Format (*.rtf)"

> >> This string matches part of the value in the registry under:

> >> HKLM\Software\Microsoft\Office\8.0\Access\Report Formats

> >> You can output snapshots by putting the literal string:

> >>     "Snapshot Format (*.snp)"

> >> in your DoCmd.OutputTo statement.

> >> Michael


> >> >Does anybody have any code (if it Is it possible, that is) to output
a
> >> >report as a snapshot file entirely via code, not using macros?
> >> >--
> >> >Pete B



Tue, 11 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Quote:

>None of those users you refer to, with early versions of Win, etc., can
>export anything to a PDF file unless they buy the Acrobat PDF Writer.
>Everybody that owns MS Office97 and installs the free SR can do the
>equivalent operation for free.

>Sounds like you need to convince MS to buy Adobe and then have them give
>away Acrobat for free, then you will get what you want.  Me, I'll settle
>for this.
>--
>Pete B

The last thing I was insinuating was that MS buy Adobe (heaven forbid)...or
that a solution need to be free; quite the contrary.  (The internet has
{*filter*}ed users to free software, and casual developer's to "free code".)  I
was advocating Acrobat as a solution because it is broad based and can
really get the job done no matter what the receiver's platform is; its just
good technology and in my estimation well worth the price for the software.
The snapshot viewer IS a nice and needed add on for A97 and its great that
its free, but it only works on win32; it just doesn't support the other
platforms (unless you use the ocx for an intranet).  There are still too
many companies and individual users in my estimation on win 3.1 or other
platforms to be ignored in developing a comprehensive business solution for
a client.  Not to mention the Access users of pre-97 vintage (A2 is still a
gem in many respects, and there are too many installs and apps to count and
lots of development.)

Good thread, good discussion.

Steve Arbaugh
ATTAC Consulting Group



Tue, 11 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

My last comment (I promise!)
What you say about users with earlier versions of Access not having this
capability is right on the mark, and there are indeed many of them, in fact
I will venture they are the majority, that still use the early versions.
My only "beef" with Adobe is the price for the licenses, I think it is
(was) outrageous, but just like you I use it extensively not just for
Access but everywhere.  And it indeed remains, for earlier versions, the
ONLY way to generate a fully-formatted native Access report as a file for
attaching to an email.  Although you can send FAXes directly from Access,
most FAX equipment does not have the resolution to transmit a report in
full detail.

As I stated earlier in the thread, our company uses Acrobat for world-wide
dissemination of internal company information, soi we are no strangers to
it.  And I still marvel at the "coincidence" of the resemblance between the
Acrobat and Snapshot operations.
--
Pete B



Quote:

> >None of those users you refer to, with early versions of Win, etc., can
> >export anything to a PDF file unless they buy the Acrobat PDF Writer.
> >Everybody that owns MS Office97 and installs the free SR can do the
> >equivalent operation for free.

> >Sounds like you need to convince MS to buy Adobe and then have them give
> >away Acrobat for free, then you will get what you want.  Me, I'll settle
> >for this.
> >--
> >Pete B

> The last thing I was insinuating was that MS buy Adobe (heaven
forbid)...or
> that a solution need to be free; quite the contrary.  (The internet has
> {*filter*}ed users to free software, and casual developer's to "free code".)
I
> was advocating Acrobat as a solution because it is broad based and can
> really get the job done no matter what the receiver's platform is; its
just
> good technology and in my estimation well worth the price for the
software.
> The snapshot viewer IS a nice and needed add on for A97 and its great
that
> its free, but it only works on win32; it just doesn't support the other
> platforms (unless you use the ocx for an intranet).  There are still too
> many companies and individual users in my estimation on win 3.1 or other
> platforms to be ignored in developing a comprehensive business solution
for
> a client.  Not to mention the Access users of pre-97 vintage (A2 is still
a
> gem in many respects, and there are too many installs and apps to count
and
> lots of development.)

> Good thread, good discussion.

> Steve Arbaugh
> ATTAC Consulting Group



Wed, 12 Jul 2000 03:00:00 GMT  
 Output Report To Snapshot Via Code

Simplicity. MS supplies snapshots - we use snapshots.
--
Doug Hutcheson - Consultant
Brisbane, Australia
http://www.powerup.com.au/~hutchsys



Quote:

> >Thanks, Michael.  I received several replies saying this same thing.  It
> >was the lack of a predefined constant that had me in doubt, but I
suspected
> >it might be something like that.  I am told the same thing will work
with
> >the SendObject statement as well.

> >I am going to give it a try, solves a big problem for me!
> >--

> The real question Pete is why much with snapshots at all, rather than
using
> a real portable document format like Adobe Acrobat.......These can be
> automated through code as well.

> Steve Arbaugh
> ATTAC Consulting Group
> web: http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
> To reply, remove ~ and nospm from address




Thu, 13 Jul 2000 03:00:00 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Export SnapShot reports via code

2. exporting a report as a snapshot with code

3. Save report as Snapshot in code

4. Need code for sending Access report as Snapshot

5. doCmd.SendObject missing snapshot output format

6. FindFirst method with snapshot created via ODBC

7. How to add/delete controls on reports via code

8. Access reports to HTMl via code

9. CONNECT AND PRINT CRYSTAL REPORT VIA CODE

10. Can you refresh a report via code?

11. Access report via VB code

12. Report layout design via code?

 

 
Powered by phpBB® Forum Software