1
@node Reports, User Preferences, Register, Top
5
The reporting infrastructure is designed facilitate the creation
6
of sophisticated reports including tables, graphs, and hyperlinks.
7
The infrastructure includes functionality to support the following:
12
Creation of tables, with headings, subheadings, totals, and subtotals.
15
Formatting of dates & numbers.
21
Create of graphs such as pie and bar charts.
24
Creation of hyperlinks to other reports and to other GnuCash
25
objects such as registers.
34
@node Creating a Report, , Reports, Reports
35
@section Creating a Report
37
To define a report, your report must have
39
@code{(gnc:support <your_report_name>)}
43
@code{(gnc:depend "report-utilities.scm")}
47
@code{(gnc:depend "report-html.scm")}
49
if you wish to use the html generation facilities. You should
50
avoid creating HTML directly wherever possible.
52
To autoload your report, you should add the line @code{(gnc:depend
53
<your_report_name>)} to the file @file{src/scm/report/report-list.scm}.
55
@code{(gnc:depend "date-utilities.scm")}
57
has lots of date-manipulation functions you'll almost certainly need.
59
To define a report, you call @code{(gnc:define-report)}. This function
60
can accept a variable number of arguments, but at the moment four
61
distinct arguments are recognised, as in the following from
62
the transaction report:
67
'name (N_ "Transaction Report")
68
'options-generator trep-options-generator
69
'renderer trep-renderer)
75
This is the version number of the report, which is currently ignored.
78
This is the name of the report. It should be marked as translatable,
79
but the name should be given in untranslated form, hence the use of
82
@item options-generator
83
This should be a function that takes no arguments and returns an options
84
structure with the options for the report. The options interface is
85
currently not fully documented, but should be.
88
This is the function which renders the HTML.