Frage

I work for a non-profit who uses MS Access 2003 to keep track of donations and benefactors. Someone, a long time ago, wrote a huge VBA application inside access to keep track of everything, but we've outgrown Access's limitations. We're looking at replacing it with a web application (Java/MySQL), perhaps created with Wavemaker, but one feature which is very useful is the ability to launch a Word document (I don't know the name of the feature exactly), based on a template, that populates the template with some data from the Access DB. For example, a "Thank You" letter for a benefactor which is populated with their name and address.

I have no idea how to mimic this feature in a web application, and I'm open to any suggestions (even the abhored ActiveX controls). Any ideas?

Thanks in advance!

War es hilfreich?

Lösung

The general approach is not to automate client side. So you generate a PDF or word or perhaps even a rich text file server side then THEN provide a URL/link for the user to click on.

The user can then click on that URL (file) and the local client side software (either browser or word) can then open + render that file.

So a browser is quite happy to allows one to open a PDF or word (rtf) file FROM server side in the client side. And this includes opening such files with Word.

Attempting to launch CLIENT side software from a browser is not only a “high” risk adventure but if you setup such computers to allow the browser to create + launch + run + use such files client side then you open a security hole the size of a barn door.

What is to say with such security holes being opened the next site will not open or scan or look for files like “banking” or personal finance? So you really do not want nor can you attempt to automate client side software from a web browser.

However creating a PDF or even using some kind of web based report writer, they often have a “web export” option that creates a PDF or even Word format file that can be opened local. For example SQL server reporting services has a great PDF and Word export feature.

In fact if you using Access web services (that is Access web publishing for 2010), then the Access web reports render these reports near “perfect” in word and in fact Web Access Reports render better in Word then do client based Access applications!

So for example, looking at an Access Web based Report, you see this option:

enter image description here

If you click on actions then you get this option in the web browser:

enter image description here

Now, when you click on that, you can choose PDF or Word and your LOCAL client opens + renders the report. Really nice is all graphics and formatting is preserved in the web report (unlike client reports that loose their graphics).

The above of course is using Access Web publishing which just so happens to use SQL server reporting services. The “key” suggesting here DESPITE the fact that you don’t have or may not have SQL reporting services is that the creating + rendering of the document occurs SERVER side, and THEN the client can simply “open” or consume the report as PDF or in this case as above shows Word. Once again this means no client side automaton is required.

So create the document or template 100% server side. Depending on the reporting system and Web development tools you adopt then such tools might have built in Word creating system. In above I ONLY used MS Access to create this web site and the Access Web development tools are based on SQL reporting services which has the PDF and Word export built in as per above shows.

If you don’t have a report system you can still adopt a PDF format system or even use a common format like Rich Text which CLIENT side MS Word handles and opens quite well.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top