Murray's Blog

Glom: Reports/Printing

Printing/Reports is the last big task for Glom before it's
fundamentally usable, I think. It's also the perfect thing for other people to hack on, because it doesn't need much knowledge of the existing code. The Document object can tell you about the database structure and you can get the data directly from Postgres itself, using the existing GlomConversion functions to display the values appropriately in the locale.

I don't plan to muck around with libgnomeprint, considering that cairo should replace it somehow within the foreseeable future. So I'm happy just to ouput HTML and let the browser take care of printing it. We'd need HTML output anyway.

I already coded a proof of concept. Choosing File|Print in the Details view does the following:

The output is ugly but any non-hacker can improve it by editing the XSLT file and/or adding a stylesheet.

However, people will want to create custom printouts for Details, such as Invoice printouts, and they will want to create grouped List reports. For the reports, they will need to specify (optional) parts like:

The UI for adding and arranging these parts to a layout might use a TreeView, or maybe a canvas. It's worth looking at FileMaker, but layout is very fiddly with FileMaker, and people find the print layout UI very unintuitive.

I don't know of any existing report generators for Linux, but maybe there's a good one. I'm happy to cooperate and reuse code wherever the license allows.

Exit mobile version