Solution for creating high quality HTML reports in MS Access (1 Viewer)

Evgeny

New member
Local time
Today, 03:12
Joined
Jan 20, 2013
Messages
3
Dear all,

Just want to share the solution I built for creating of high-quality HTML reports in MS Access, describe workarounds, which I had to implement as well as to provide a link to real tool which implements this solution for MS Access 2007 / 2010 (Meeting minutes, Issues, Risks, Agreements, Actions, Projects Tracking Tool).

There is nothing extremely new in my solution; similar approach is described previously

However I give a link to real implementation as well as describe workarounds, which I had to use.

Problem description:

This is a common knowledge, that even though available, the export to HTML from MS Access report is not working well. Such export will never produce a high-quality HTML
So, the only solution to save Access report outside of MS Access is to PDF it. This solution has disadvantages:

  • It is difficult to edit or comment PDF or to copy and paste information from it. afterwards. Hence it is difficult to others either to use data from this report or to provide a feedback on it.
  • If you send it via email, you have to send it as attachment. Now days, when everybody is using mobile phones to read emails, it creates extra complications.
Besides, if you email information as attachment, you can’t use MS Outlook search engine to search for information within attachment.

Solution

Even though MS Access can’t export reports to HTML well, the structure of Access report is very suitable to create an HTML code itself.

The code of HTML page has header, body and footer and MS Access report has the same elements.

Table in HTML has also sort of header body and footer, hence it is very easy to create HTML code for table using subreports: e.g.

Header:



<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>

Body

<tr>
<td>cell 1</td>
<td>cell 2</td>
</tr>

Footer
</table>

So, the trick is to create report which, when saved as text format, would create HTML code.

As example, if you want to have a header at the top of HTML report, you have to create the following text in MS Access report:

<h1> Header text </h1>

Tricks, issues and workarounds
There are several tricks though, which one has to use.

1) Use CSS
Use CSS in your HTML code, it will make the HTML code much compacter.

2) Rich formatted Memo field
In Access 2007 there is a nice feature of rich format for Memo field, which is in reality saved as html text in Access. It is very well compatible with our approach. So, when placing control on MS Access report for this rich-formatted memo field, just set it’s property to text (not rich text), this will produce a direct HTML code into your report for rich-formatted memo field.


3) Issue, when exporting to text.
There is an issue, that export of complex reports (with subreports and a lot of information etc) to text formal does not work well always, there seems to be a bug in Access. Sometimes lines get mixed, sometimes information gets dropped completely.

Workaround.
I found, that exporting to rich format works much better. So the trick is to export Access report 1st to rich format and then use office automation of MS Word from MS Access to open this .*rtf file and save it to text format with *.html extension. It reality it works quite well and user does not notice anything as MS Word opens in background.

You can find MS Access 2007/2010 database, which uses this approach to produce HTML reports in sourceforge if you search for the word "MIRAAPT" in Google.

Note: MIRAAPT stands for Meeting Minutes, Issues, Risks, Agreements, Actions, and Projects Tracking.

Regards.

Evgeny.

P.S. by the way, if somebody is interested in my tool and wants to co-develop – you are more than welcome to get in contact with me.
 
Last edited:

danielch

New member
Local time
Today, 12:12
Joined
Nov 19, 2019
Messages
1
Hi Evgeny,

I'm intrested in your solution
please provide contact details

Daniel
 

Evgeny

New member
Local time
Today, 03:12
Joined
Jan 20, 2013
Messages
3
danielch, you can reach me at ev2geny at gmail.com
 

Evgeny

New member
Local time
Today, 03:12
Joined
Jan 20, 2013
Messages
3
Nikita_lopik,

I sent you email now, but in general the tool I developed can be downloaded at sourceforge

This does not allow me to post a proper URL, but search for the word MIRAAPT

Or remove spaces in the below

sourceforge.net / projects / miraapt

The source code is there, in access VBA
 

Users who are viewing this thread

Top Bottom