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.
Someone should really work on the documentation first. I can’t get my head around this libgda thing.
It’s too hard for me to understand this without multiple documentation paper (official documentation, tutorials, code examples…)
Is this planned to be done ? (Please say yes, even if it’s not)
I will just take an example of what disturbs me when I’m trying to learn how to code with libgda.
From the documentation, an example on how to do a sql select query[1]:
http://malerbavintner.free.fr/doc/libgda-3.0/ch05s03.html
Now the libgda API[2]:
http://malerbavintner.free.fr/doc/libgda-3.0/GdaConnection.html#gda-connection-execute-select-command
In [1] you see this:
GList *list = gda_connection_execute_select_command (connection, command, NULL);
in [2] GdaDataModel* gda_connection_execute_select_command(…
I doubt GdaDataModel* is the same as a GList*. Is it?
That’s not a coherent help. And that’s why I can’t get my mind around this gda thing, that I really want to learn!
Could you please ask someone to review the documentation. That would be awesome.
I know the current documentation is not enough, and I’m trying to bring it to a good level: better API documentation, more tutorials on the gnome-db.org wiki, and some good examples in the samples/ directory to help people get started.
One explanation for the doc. incoherences is that the API have changed from the previous stable version, and it’s difficult to keep all the documentation in sync…
The incoherence problem is a bug in the doc which I’m going to correct ASAP, thanks for pointing it (if you know of any other, please le me know).
If I see anything else, I will for sure.
Should I post this to the bugzilla in the future, or on the mailing-list, or just here?
I don’t see any Doc sub-project under libgda product. Should it be reported under “3.0.x”?
http://bugzilla.gnome.org/buglist.cgi?product=libgda&bug_status=NEW&bug_status=REOPENED&bug_status=ASSIGNED&bug_status=UNCONFIRMED&version=3.0.x
Please report them in bugzilla, I’ve just created a documentation component, and a 3.1.x version (to use in case you are using the SVN trunk version). Thanks!