It is possible to modify existing or write own reports, if the available ones are not suitable. To
do this you will need to know Guile
, GNOME's implementation of
Scheme, which again is a LISP-like programming
language, and it is an excellent idea to have a copy of the GnuCash
source code available.
Introductory files in the source code
gnucash/report/doc/report-html.txt documents the reporting interface.
gnucash/report/reports/example/hello-world.scm is an example demonstrating different types of options.
To get informations from your GnuCash
book for your report it is also necessary to access data from
the GnuCash
engine. This binding is generated by Swig
and based on
a set of Scheme wrapper functions in
bindings/guile
.
[11]
Tipp | |
---|---|
Examine some of the other reports in
Some users started a table in https://wiki.gnucash.org/wiki/Custom_Reports#The_GnuCash_API. |
Because the above file only contains the syntax of the function you can use the nightly
Doxygen
generated API documentation online for
the bugfix branch or
feature branch to get more information about the
functions.
After setting up a build environment you can also generate it locally by running
# make users: make doc # ninja users: ninja doc
in your build directory and then open
with
your preferred browser.
BUILDDIR
/libgnucash/doc/html/index.html
At present, reports are produced by calling a HTML-generation API, which outputs a dialect of HTML and rendering this with a HTML widget. This has limitations, particularly when trying to align objects precisely, as might be necessary for printing onto pre-printed invoices for example.
See also Abschnitt 9.4, „Printing or Exporting Reports and Charts“.