The future of custom reports

Josh Sled jsled at asynchronous.org
Wed Jan 28 15:33:16 EST 2009


hendrik at topoi.pooq.com writes:
> But I have a bit of time this month, and replacing the code may be an 
> option.  So it's time to ask -- what's the official interface for 
> reporting in gnucash?  I've seen a few hints that it consists of writing 
> code in guile, but no detailed specs.

The existing reports are written in guile, yes.

> One web page on the matter, 
> http://www.gnucash.org/docs/v1.6/de_DE/t6797.html says under "accessing 
> engine data":

1.6 docs are quite old.

>         The functions used to access the various forms of accounting
>         data may be found in the file  src/g-wrap/gnc.html.
>
>         Need some examples here...
>
> Looking in the online source code, 
>  at http://svn.gnucash.org/trac/browser/gnucash/trunk/src, I see no 
> directory g-wrap.

g-wrap (a custom guile<->C binding tool used by very few projects) was
replaced by SWIG in … 2.0?

> But I seem to remember reading of a desire by the devalopers to 
> eliminate guile from gnucash and thus simplify the build-requirements 
> for gnucash (which have been daunting in the past.  I remember 
> struggling with it years ago; now I find it easier to just apt-get the 
> Debian package).
>
> Is guile going to continue to be the preferred way to write report 
> generators?

There may be desire, but no one is actually doing anything along these
lines.  I had plans to, but I no longer have those plans.


> * If so, where are the relevant API's defined and documented?  

- src/report/**/*.scm

- http://cvs.gnucash.org/docs/HEAD/ is relevant in as much as the
  scheme/report code uses wrapped GnuCash C API.

> WIll it be possible to use text formatting notations other than HTML?
> (There are some really nide XML-based document generators, for
> example)

The reports can emit whatever they like (the reports emit HTML, it's not
a PHP-like template approach).  Unfortunately, the UI infrastructure is
only setup at present to take the results of a report and feed it to
GtkHTML.

-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20090128/947e0775/attachment.bin 


More information about the gnucash-user mailing list