9.5. Creating Reports and Charts

Nota

Questa sezione potrebbe dover essere aggiornata!!!

Se i resoconti forniti da GnuCash non soddisfano le proprie esigenze, è possibile crearne di nuovi. Per farlo è necessario conoscere Scheme (un linguaggio di programmazione simile a LISP) ed è anche consigliato avere accesso al codice sorgente di GnuCash.

L’interfaccia dei resoconti è documentata nel seguente file del codice sorgente src/report/report-system/doc/report-html.txt. Il file src/report/utility-reports/hello-world.scm nella distribuzione sorgente di GnuCash fornisce un buon esempio di come sviluppare un resoconto.

9.5.1. Accessing the GnuCash API

It is also necessary to access data from the engine to get information for your report. This is since version 2.1.x performed by a set of Scheme wrapper functions that are documented in the file src/engine/swig-engine.c. Up to version 2.0.5 it was src/g-wrap/gnc.html. Examine some of the other reports in src/scm/report for an indication of how they are used.

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 Doxygen source documentation either local after running

./configure --enable-doxygen --enable-html-docs
make doc

on your sources or online https://code.gnucash.org/docs/MAINT/ or https://code.gnucash.org/docs/MASTER/ to get more information about the functions.

9.5.2. Report Rendering

Attualmente, i resoconti sono prodotti richiamando una API di generazione HTML, che fornisce una dialettica di HTML e la disegna con un widget HTML. Questa procedura presenta delle limitazioni, in particolare qiuando si tenta di allineare gli oggetti con precisione, come può rendersi necessario per stampare su fatture pre-stampate.