473,408 Members | 1,861 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,408 software developers and data experts.

How to display MS Access Reports in a web page?

Greetings all,

So first post here, but it looks like an active, helpful community, so here goes.

I am working with a client who wants to make his current MS Access 2007 Reports available on demand in his web site. Currently, as I understand it, the managers of the company are being required to actually load MS Access and the active database to run the reports which exposes all of the data and linked tables to people who have no reason to modify them. So my client just wants them to be able to log into the admin section of the company website and request a report which he has already built in Access. I am trying to figure out how to get those reports to an ASP.NET application for the website to consume.

I have already spent a day looking at the Microsoft.Office.Interop library, and I don't think that that will cut it because I can actually get the HTML for the Report directly out of the application. All I can find is an option to save it to the hard disk which is inelegant and could easily cause problems with filename changes when I try to then load the document from ASP.

What I would like to see is a solution by which I can load the mdb or accdb file into the ASP application, access the Reports as a container and select the one I want by name, and then run it and collect the output in HTML to then simply echo to the webpage. Is there anything out there that can:

Expand|Select|Wrap|Line Numbers
  1. // Psuedo-code
  2. Dim AccessFile As MSAccessFileOperator
  3. Dim Reports As List(Of MSAccess.Reports)
  4. Dim htmlResult As String
  5.  
  6. AccessFile = New MSAccessFileOperator("myDatabase.accdb")
  7. Reports = AccessFile.Reports
  8. htmlResult = Reports("MyReportName").toHTML
  9.  
I haven't found such a method yet, and I am okay with the idea that maybe it isn't possible to do it that easily, but, at the end of the day, I need the HTML result of the Report to exist in memory as a String. Any thoughts?

Jason
Jan 21 '11 #1
5 5843
Rabbit
12,516 Expert Mod 8TB
Well... you can automate exporting access reports to html format using the DoCmd.OutputTo command but it's not dynamic. You would have to reexport each time you wanted to update the information.

If you want it dynamic, you could create a data access project instead. I think you would have to recreate the reports. And I think the user would have to install an Active-X component.
Jan 21 '11 #2
Right, DoCmd.OutputTo will write a file to the hard drive though, which I would have load from there again at some point. It also causes Access to actually open and, on my machine anyway, I have to click through a dialog box (in access) and choose a file name. My client wants more automation than that.

With regard to the second option, I don't mind the ActiveX component, but if I have to 'recreate the report' then he can't build it in Access, right? The specific request was to allow him to do what he has always done and create the report in Access, but to just pass the results to a web page on request.

Like I said, I'm not even sure if this is really possible without writing MS Access plugins and what not, but... is there another way?
Jan 21 '11 #3
Rabbit
12,516 Expert Mod 8TB
You don't have to click through the prompts for DoCmd.OutputTo if you supply enough parameters.

A data access page is created within Access.
Jan 21 '11 #4
Well, I am using a COM reference to 'Microsoft Access 12.0 Object Library' and don't seem to have a DoCmd.OutputTo... what I have (and have been using) is a RunCommand(Access.AcCommand.acCmdExportHTML) which works except that it doesn't accept any additional parameters. Am I using the wrong library?
Jan 22 '11 #5
Rabbit
12,516 Expert Mod 8TB
What version of access are you using?
Jan 22 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Luis Serrano | last post by:
Hi all, I'm trying to generate labels to print in several different formats, all of them with their own height,width and page margins. We've got this done in MS Access 2000, using a designed...
1
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
5
by: Steven Taylor | last post by:
Hope someone can help. I have an application whereby in order to create one document type I effectively print out 3 or 4 access reports in correct order. So the user goes to the printer,...
1
by: Brian Barnes | last post by:
I've been searching using google trying to find a way to display Access Reports via ASP.NET and only finding commericial products which appear to require that the report needs to be converted every...
1
by: David | last post by:
Does anyone know how to run MS Access reports from VB.net. I'd like to keep the existing reports in the database if I can. Thanks David
0
by: dkurtz | last post by:
D. Lesandrini published an article some time ago about exporting Access reports as XML, and then updating those XML reports dynamically in ..NET....
16
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
1
by: NeoDeGenero | last post by:
I have a little VBA/Access - Reports problem and I’m not sure on how to approach it: I am trying to send a Report generated by MS Access via email through the command SendObject. ...
0
by: Qtip23 | last post by:
Hello All, So I have a my database information placed on a SharePoint site now that there is an immediate need for a web-based application in my division. I am able to print Access Reports...
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
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,...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.