473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim acApp As Access.Application
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\Samples\Northwind.mdb"

acApp = New Access.Application
With acApp
.OpenCurrentDatabase(DB_PATH)
' Print the Product Catalog report.
.DoCmd.OpenReport("Catalog", Access.AcView.acViewPreview)
.DoCmd.OutputTo(Access.AcOutputObjectType.acOutput Report,
"Snapshot Format", "C:\Inetpub\wwwroot\YMSReports\DB\Container.sn p", False)
End With
acApp.Quit()
acApp = Nothing
End Sub
Nov 23 '05 #1
1 8015
I got it, here's the code that works:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim acApp As Access.Application
Dim strDBPath As String
Const acFormatSNP = "Snapshot Format (*.snp)"
Const DB_PATH As String = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"

acApp = New Access.Application
With acApp
.OpenCurrentDatabase(DB_PATH)
' Print the Product Catalog report.
.DoCmd.OpenReport("Catalog", Access.AcView.acViewPreview)
.DoCmd.OutputTo(Access.AcOutputObjectType.acOutput Report, ,
acFormatSNP, DB_PATH & "Container.snp")
End With
acApp.Quit()
acApp = Nothing

Response.Redirect("C:\Inetpub\wwwroot\YMSReports\D B\Container.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(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim acApp As Access.Application
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\Samples\Northwind.mdb"

acApp = New Access.Application
With acApp
.OpenCurrentDatabase(DB_PATH)
' Print the Product Catalog report.
.DoCmd.OpenReport("Catalog", Access.AcView.acViewPreview)
.DoCmd.OutputTo(Access.AcOutputObjectType.acOutput Report,
"Snapshot Format", "C:\Inetpub\wwwroot\YMSReports\DB\Container.sn p", 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
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....
7
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...
5
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...
2
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...
2
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
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...
4
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...
13
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...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.