gnucash-docs maint: Update the API section in Creating Reports
Frank H. Ellenberger
fell at code.gnucash.org
Wed Jan 27 23:02:48 EST 2016
Updated via https://github.com/Gnucash/gnucash-docs/commit/2c8a3600 (commit)
from https://github.com/Gnucash/gnucash-docs/commit/a0ea53d9 (commit)
commit 2c8a3600cf72714d9b010eb143ad21253d289483
Author: fell <f.ellenberger at online.de>
Date: Thu Jan 28 05:02:40 2016 +0100
Update the API section in Creating Reports
Replacement of g-wrap by swig.
Mention doxygen.
diff --git a/help/C/Help_ch_Reports.xml b/help/C/Help_ch_Reports.xml
index d930e29..4b0a958 100644
--- a/help/C/Help_ch_Reports.xml
+++ b/help/C/Help_ch_Reports.xml
@@ -1181,52 +1181,80 @@
</sect1>
- <sect1 id="report-print">
- <title>Printing or Exporting Reports and Charts</title>
+ <sect1 id="report-print">
+ <title>Printing or Exporting Reports and Charts</title>
- <note><para> Verify !!! How customize printing with Gnome?</para></note>
+ <note><para> Verify !!! How customize printing with Gnome?</para></note>
- <para><application>&app;</application> is able to print reports and to export the reports to <acronym>HTML</acronym> (web) pages. The
- Print <application>&app;</application> Document dialog is accessed from the <guibutton>Print</guibutton> button on the <emphasis>Toolbar</emphasis> or
- go to <menuchoice><guimenu>File</guimenu><guimenuitem>Print</guimenuitem></menuchoice> in the menu. To Export a report to a web page (<acronym>HTML</acronym>) select
- the <guibutton>Export</guibutton> button on the <emphasis>Toolbar</emphasis> and type in a file name.</para>
+ <para><application>&app;</application> is able to print reports and to export the reports to <acronym>HTML</acronym> (web) pages. The
+ Print <application>&app;</application> Document dialog is accessed from the <guibutton>Print</guibutton> button on the <emphasis>Toolbar</emphasis> or
+ go to <menuchoice><guimenu>File</guimenu><guimenuitem>Print</guimenuitem></menuchoice> in the menu. To Export a report to a web page (<acronym>HTML</acronym>) select
+ the <guibutton>Export</guibutton> button on the <emphasis>Toolbar</emphasis> and type in a file name.</para>
- <para>Most reports, being presented in HTML, can also be copied and pasted into a spreadsheet.</para>
+ <para>Most reports, being presented in HTML, can also be copied and pasted into a spreadsheet.</para>
- <para>The Print <application>&app;</application> Document dialog is used to select which Printer to send the
- print job to or to print to a File. It also contains a Preview button to view the
- document before printing. Press Print to send the job to the selected printer or
- <guibutton>Cancel</guibutton> to dismiss the Print dialog.</para>
+ <para>The Print <application>&app;</application> Document dialog is used to select which Printer to send the
+ print job to or to print to a File. It also contains a Preview button to view the
+ document before printing. Press Print to send the job to the selected printer or
+ <guibutton>Cancel</guibutton> to dismiss the Print dialog.</para>
- <para>Printing from an open register prints the Account Report, which is also called
+ <para>Printing from an open register prints the Account Report, which is also called
the Register Report. This lists transactions in the account with a total. Other
reports print as viewed in the Report screen.</para>
- </sect1>
-
- <sect1 id="report-create">
- <title>Creating Reports and Charts</title>
-
- <note><para>This section may need updating !!!</para> </note>
-
- <para>It is possible to write reports if the current ones are not suitable. To do this
- you will need to know Scheme (a LISP-like programming language), and it is an
- excellent idea to have a copy of the <application>&app;</application> source code available. </para>
-
- <para>The reporting interface is documented in the source code file
- <filename>src/report/report-system/doc/report-html.txt</filename>. The file <filename>src/report/utility-reports/hello-world.scm</filename>
- in the <application>&app;</application> source distribution provides a good example of how reports are
- developed.</para>
+ </sect1>
- <para>It is also necessary to access data from the engine to get information for your
- report. This is performed by a set of Scheme wrapper functions that are documented in
- the file <filename>src/g-wrap/gnc.html</filename>. Examine some of the other reports in src/scm/report for
- an indication of how they are used.</para>
+ <sect1 id="report-create">
+ <title>Creating Reports and Charts</title>
+
+ <note><para>This section may need updating !!!</para> </note>
+
+ <para>It is possible to write reports if the current ones are not suitable. To do this
+ you will need to know Scheme (a LISP-like programming language), and it is an
+ excellent idea to have a copy of the <application>&app;</application> source code available. </para>
+
+ <para>The reporting interface is documented in the source code file
+ <filename>src/report/report-system/doc/report-html.txt</filename>.
+ The file <filename>src/report/utility-reports/hello-world.scm</filename>
+ in the <application>&app;</application> source distribution provides a
+ good example of how reports are developed.</para>
+
+ <sect2 id="report-api">
+ <title>Accessing the <application>&app;</application> <acronym>API</acronym></title>
+
+ <para>It is also necessary to access data from the engine to get
+ information for your report. This is
+ <emphasis>since version 2.1.x</emphasis> performed by a set of
+ Scheme wrapper functions that are documented in the file
+ <filename>src/engine/swig-engine.c</filename>.
+ <emphasis>Up to version 2.0.5</emphasis> it was
+ <filename>src/g-wrap/gnc.html</filename>. Examine some of the other
+ reports in src/scm/report for an indication of how they are used.</para>
+
+ <para>Some users started a table in the <application>&app;</application> wiki
+ <ulink url="http://wiki.gnucash.org/wiki/Custom_Reports#The_GnuCash_API">
+ Custom Reports#The GnuCash API</ulink>.
+ </para>
+
+ <para>Because the above file only contains the syntax of the function
+ you can use the Doxygen source documentation either local after running
+<screen>
+./configure --enable-doxygen --enable-html-docs
+make doc
+</screen> on your sources or online
+ <ulink url="http://code.gnucash.org/docs/MAINT/">http://code.gnucash.org/docs/MAINT/</ulink> or
+ <ulink url="http://code.gnucash.org/docs/MASTER/">http://code.gnucash.org/docs/MASTER/</ulink>
+ to get more information about the functions.
+ </para>
+ </sect2>
- <para>At present, reports are produced by calling a <acronym>HTML</acronym>-generation API, which outputs
+ <sect2 id="report-render">
+ <title>Report Rendering</title>
+ <para>At present, reports are produced by calling a <acronym>HTML</acronym>-generation API, which outputs
a dialect of <acronym>HTML</acronym> and rendering this with a <acronym>HTML</acronym> widget. This has limitations,
particularly when trying to align objects precisely, as might be necessary for
printing onto pre-printed invoices for example.</para>
- </sect1>
+ </sect2>
+ </sect1>
</chapter>
Summary of changes:
help/C/Help_ch_Reports.xml | 96 ++++++++++++++++++++++++++++++----------------
1 file changed, 62 insertions(+), 34 deletions(-)
More information about the gnucash-changes
mailing list