The
attached linked zip archive is a little database application with
-- a Read Me file
-- a Base document as configuration file
-- a database driver hsqldb.jar (HSQL 2.3)
-- a database backend (4 files in a folder)
-- and a database frontend consisting of a serial letter template, an input form and a reporting spreadsheet.
The part which is directly related to your question is the letter template containing a macro which is triggered by document event “Printing of form letter finished” (see Tools>Customize...).
The OutputX.odt files are my test results from printing serial letters to documents.
All you need is some trusted macro directory where you extract the archive.
Open the database document, wait for a success message, save, close, forget the database document.
Open the ReadMe file and start from there.
Once the database has installed itself, the frontend files can be moved or accessed through desktop links. Since they refer to the registered database name, they always find their database.
The only macro which is required for the installed demo is the one in the letter template.
The report is a most simple spreadsheet but this report type is easily adjustable, filterable, sortable, formattable in place by end users.
Advantage of the form document:
-- The input form lets you pick database records to be printed much easier than selecting records on a grid view. You can select records, do something else, collect more records later and print all records at the end of the day.
-- It avoids duplicates because already printed records are not selectable and not storable.
-- You keep track of what had been printed when.
The advantages of external HSQL database over embedded ones have been discussed frequently on this forum. The type of database has nothing to do with this topic.
However, I used this PrintLog application as another test case for my FreeHSQLDB extension which helps to convert embedded into stand-alone database and to build portable, self-installing database packages.
FreeHSQLDB v.0.3 (todays bugfix release 0.3.2).
Please let me know if the database installs properly on your system.