473,794 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export Access report to a snapshot file and view on web site

Hi,
I need to provide Access reports from our web site. When the app gets to the
output command I get this error I get this error:
The formats that enable you to output data as a Microsoft Excel, rich-text
format, MS-DOS text, or HTML file are missing from the Windows Registry.
Also after the snapshot is created how do I get it to the users web page?
Thanks

Here is my code:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim acApp As Access.Applicat ion
Dim strDBPath As String
Const acQuitSaveNone = "2"
Const acViewPreview = "2"
Const acViewNormal = "0"
Const acOutputReport = "3"
Const acSendReport = "3"
Const acFormatRTF = "Rich Text Format (*.rtf)"
Const acFormatXLS = "Microsoft Excel 97-2002 (*.xls)"
Const acFormatSNP = "Snapshot Format (*.snp)"
Const acFormatHTML = "HTML (*.html)"
Const DB_PATH As String = _
"C:\Program Files\Microsoft Office\Office\S amples\Northwin d.mdb"

acApp = New Access.Applicat ion
With acApp
.OpenCurrentDat abase(DB_PATH)
' Print the Product Catalog report.
.DoCmd.OpenRepo rt("Catalog", Access.AcView.a cViewPreview)
.DoCmd.OutputTo (Access.AcOutpu tObjectType.acO utputReport,
"Snapshot Format", "C:\Inetpub\www root\YMSReports \DB\Container.s np", False)
End With
acApp.Quit()
acApp = Nothing
End Sub
Nov 23 '05 #1
1 8061
I got it, here's the code that works:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim acApp As Access.Applicat ion
Dim strDBPath As String
Const acFormatSNP = "Snapshot Format (*.snp)"
Const DB_PATH As String = _
"C:\Program Files\Microsoft Office\Office\S amples\Northwin d.mdb"

acApp = New Access.Applicat ion
With acApp
.OpenCurrentDat abase(DB_PATH)
' Print the Product Catalog report.
.DoCmd.OpenRepo rt("Catalog", Access.AcView.a cViewPreview)
.DoCmd.OutputTo (Access.AcOutpu tObjectType.acO utputReport, ,
acFormatSNP, DB_PATH & "Container.snp" )
End With
acApp.Quit()
acApp = Nothing

Response.Redire ct("C:\Inetpub\ wwwroot\YMSRepo rts\DB\Containe r.snp",
False)

End Sub

"Vincel2k2" wrote:
Hi,
I need to provide Access reports from our web site. When the app gets to the
output command I get this error I get this error:
The formats that enable you to output data as a Microsoft Excel, rich-text
format, MS-DOS text, or HTML file are missing from the Windows Registry.
Also after the snapshot is created how do I get it to the users web page?
Thanks

Here is my code:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim acApp As Access.Applicat ion
Dim strDBPath As String
Const acQuitSaveNone = "2"
Const acViewPreview = "2"
Const acViewNormal = "0"
Const acOutputReport = "3"
Const acSendReport = "3"
Const acFormatRTF = "Rich Text Format (*.rtf)"
Const acFormatXLS = "Microsoft Excel 97-2002 (*.xls)"
Const acFormatSNP = "Snapshot Format (*.snp)"
Const acFormatHTML = "HTML (*.html)"
Const DB_PATH As String = _
"C:\Program Files\Microsoft Office\Office\S amples\Northwin d.mdb"

acApp = New Access.Applicat ion
With acApp
.OpenCurrentDat abase(DB_PATH)
' Print the Product Catalog report.
.DoCmd.OpenRepo rt("Catalog", Access.AcView.a cViewPreview)
.DoCmd.OutputTo (Access.AcOutpu tObjectType.acO utputReport,
"Snapshot Format", "C:\Inetpub\www root\YMSReports \DB\Container.s np", False)
End With
acApp.Quit()
acApp = Nothing
End Sub

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
11882
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
7
14377
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report is possible. If I could I would use a report to display the graph but it is not possible to send query parameters to an OLE graph on a report (or programatically change any properties of an OLE Graph). However with a Form you do have the ability to change the RowSource of
5
3486
by: tom | last post by:
Hey All- I've exported a report to Access's "snapshot" format and want to put it on a website for users to view. However, when I click on the link to the snapshot file, I notice that my browser (IE6) attempts to open it as if it were a regular html page, thereby displaying a bunch of gobbledygook. Any ideas on what has to be tweeked (in the link/on the website or server) to make the browser know it should either (a) try to launch...
2
4700
by: PerryC | last post by:
Is there a way to export an MS Access Report to Word/Excel that looks EXACTLY like it appears in Access? When I export to Excel, only certain data appears, titles, headings... all missing. The format is not aligned... When export to Word, all my lines (table lines) are gone, making it hard to read. Thanks. Perry
2
1912
by: Bill Hutchison | last post by:
I tried installing the ValuePack, but the Snapshot choice still doesn't appear when I try to Export a report. What is missing? Thanks, Bill Hutchison
3
4907
by: Jorge Cecílio | last post by:
Hi! I would like to export some MS-Access reports output to pdf. However, the only possibility offered by Access (afaik) for me to export formatted output is snp (snapshot) (I use MS-Office XP Prof. 2002 version). With formatted output I mean the *exactly* output I produce from executing my report (information is gathered from an ODBC database).
4
2600
by: Salad | last post by:
Hi: I have the following line: DoCmd.SendObject acSendReport, "TestReport", _ "SnapshotFormat (*.snp)", _ "joeblow@nowhere.com", , , "Report Test", _ "Does it open correctly?", True I have a report called TestReport. I dropped an image control in the report, and imported a .BMP file into it as the report's background, and sent it to back. I then dropped my fields on top of the image.
13
3928
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text file...whatever. I described my situation to the guy I'm doing work for and he did some research for me and came up with the following link. http://www.novapdf.com/ The part that should excite us Access developers is their SDK
1
22781
by: ellenh | last post by:
I have read postings on the similar subject including the posting from 2003 shown below. This process works fine to display a single page snapshot report in PowerPoint. I need to display subsequent pages from the same snapshot file in subsequent slides in PowerPoint. I realize that it is possible to add VB code to the Snapshot Viewer Control and that there are properties such as .FirstPage, .NextPage, .LastPage, etc, But I can't find...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10435
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.