[Lazarus] Looking for a reporting solution

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Nov 29 21:47:40 CET 2011

On 29/11/2011, Marcos Douglas wrote:
>>> Users can create ODT (OpenDocument Text) files using
>>> LibreOffice/OpenOffice Writer. You can pack/unpack them using
>>> TZipper/TUnzipper from FPC FCL and modify their xml content
>>> using DOM/XMLRead/XMLWrite. The result can be previewed and
>>> printed using Writer again.
>>> --
>> This can be the last alternative, I preffer something that does not
>> requiere external (hughe) dependencies like OpenOffice/MsOffice.
> I think Graeme Geldenhuys uses the same technique, ie, ODT.

I use RTF files created with any RTF-enabled editor (OpenOffice,
LibreOffice, MS Office etc). The RTF files are my report templates. I
insert field markers where data must go. I also use hidden markers to
notify my report engine what sections must grown (eg: lines of an
Invoice). The report engine is include in tiOPF's repository named
tiRTFParser.pas (inside the Quarantine directory). It should be quite
easy to remove the tiOPF dependency without interfering with the
report engine features.

The report engine is a single unit and can take data input from
TDataset, TtiObjectList or Custom fed data via events. It supports
images, user-defined functions (and already includes a whole bunch of
them built-in). Once the report engine processed the document, you end
up with a new populated RTF file which is your report. You can then
preview it in read-only mode with OpenOffice (this hides all edit
functions giving a really nice report preview screen. MS Office sucks
in this regard). You can also use OpenOffice's built-in macros to
generate a PDF from the RTF in silent mode (in the background without
opening OpenOffice), and let the user preview the PDF instead. All
this is possible in Linux and Windows. All our reporting is handled
this way, and it works very well indeed. There is also no dependency
on a GUI toolkit.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list