API questions

John Ralls jralls at ceridwen.us
Fri Jun 10 12:32:46 EDT 2016


> On Jun 10, 2016, at 9:24 AM, John Ralls <jralls at ceridwen.us> wrote:
> 
>> 
>> On Jun 10, 2016, at 8:43 AM, David Goodenough <david.goodenough at linkchoose.co.uk> wrote:
>> 
>> 
>> 1) From the UI I can request a customer report and tell the UI to export it as
>> a PDF.  How do I achieve the same from the API?
> 
> The reports module is written in Scheme, so anything having to do with reports must use Scheme. That API isn't documented via Doxygen (Doxygen doesn't know how to parse Scheme), so you'll have to study the code in src/reports. You may find http://wiki.gnucash.org/wiki/Custom_Reports helpful.


I should have added that the query API that the reports use is in C and are documented at http://code.gnucash.org/docs/MAINT/group__Query.html, so once you've figured out from the Customer Report what queries to run you can use C or Python to extract the data and then use other libraries to perform whatever calculations you like and to format it the way you need it.

Regards,
John Ralls




More information about the gnucash-user mailing list