views:

577

answers:

3

I have built a MS Access 2007 application that can create reports files in various formats (PDF, XLS, CSV, XML).
I would like to allow the creation of these reports to be accessible from a web page where users would just click on a link and get a download of the report produced by my Access application.

I would like to keep it simple and I'm not interested at this stage in rewriting the data processing in .Net. I'd just like to find a way to automate the creation of the user report to return a file that can be downloaded.
In essence, my Access application would act as a web service of some kind.

The web server is IIS on Windows 2003.

Any pointers or ideas would be welcome. I'm not well versed in IIS administration or ASP pages.

Thanks to all who respond.

A: 

This is kind of a round about way to achieve what you're asking. You can utilize the free version of sql server express 2005 or 2008 advance edition which includes the reporting services component. Using the report generation tools you can convert your access 2007 reports to sql server reports and have those reports feed off of the access database. You can also go to the extent of migrating the database to sql server as well if you wanted to go that route. Reporting services will generate pdf, xls, csv and xml formats as output for your reports and you can generate those reports just by passing the parameters in the url to the server which will return your report in the format requested.

Link to sql server 2008 express advanced edition:

http://www.microsoft.com/express/sql/download/

Jason
Thanks for the suggestion but while we plan migrating to SQL Server in the near future it's not really a solution at the moment. The code for the reports is already existing and we'd like to use it. It's "just" a matter of passing the request to Access and getting a file back...
Renaud Bompuis
+1  A: 

The first quick and dirty method i could think of would be to call Access from a shell and pass it a few parameters to open as read only and run a macro.

That macro would have to pull it's report parameters from somewhere (possibly env variables), run the report and save it as Excel, PDF or whatever to a unique name. To du this you'll need to pass the report name, a unique request id, and a param array to handle multiple (or none) parameters.

Last but not least your Access macro / VBA Sub will need to shut access down.

This isnt a good solution as starting one copy of Access per request isn't really advisable though.

Another option is to have start Access on the server with a VBA sub that starts on opening. This sub could poll a directory for requests that are written by your web server. Then on receiving a request run a report and write it to somewhere. Again you'd have to base this around a unique request ID.

I'm not really sure which "solution" would be better.... Access as a command line report generator or Access as a batch reporting service. Both would be nasty, but would get you over the hump until you can migrate to a reporting service.

Mark Nold
A: 

If you do not wish to rewrite in .Net, how about Classic ASP and VBScript? VBScript has a lot in common with VBA, so it should not take long create something usable, and there is a great deal of help available for ASP and VBScript on the internet. For example, a simple search returned this method of creating a PDF with Adobe from ASP:

Creating a PDF with ASP

Remou