Before releasing a 3.1.1 version of Libgda, I wanted to work a bit on Libgda’s report engine which is currently very broken (does not work at all and seems to have a difficult to use API). So I decided to reimplement one into a separate component, even though this will break the API.
After a few hours, the reports component has a generic engine which takes an XML input, and replaces the <gda_report_…> nodes with some actual content, each of these nodes being commands to perform or display some data. With only 5 of these commands, it’s possible to achieve some nice and complex results.
I have so far tested it with some DocBook and RML files. I can generate HTML from DocBook very easily, but PDF generation is more tricky since it uses FOP (which is not always packaged on distros), and it’s easy to generate PDF from RML files. Even though many features are still missing, it’s a good start…
Sample output:
- PDF output using this RML template:
- HTML and then PDF output using this DocBook template:
The code is in SVN trunk, and the examples which generate these outputs are in the samples/Report directory.