Using the Notes from a specific account in a report

Derek Atkins warlord at MIT.EDU
Tue Sep 20 09:20:44 EDT 2011


Hi,

Philip Haynes <philip.john.haynes at gmail.com> writes:

> Hi All,
> I am struggling to find the right scheme code to extract the data from
> a specific account (say "Assets:Current Assets:Transaction Account")
> for use in my report. I cannot find the right code to get a reference
> to this account. Once I have such a reference, I want to access the
> Notes data and use it in my report. I have the code to put the data I
> will eventually get in place, but I just cannot get my head around
> what calls I need to get the account reference from some string
> representation of its name.

Where are you getting the 'string representation of its name'?
Generally reports use an account picker option to allow the user to
select an account (or set of accounts).  Then you get, effectively, a
list of account objects.

There are the gnc_account_lookup_by_name() and
gnc_account_lookup_by_full_name() C APIs which should be wrapped into
Scheme.

> Any help much appreciated. I have trawled much scheme code in the
> shared resources, other reports and even the source of gnucash but I
> just can't find something to do what i want
>
> I recognize that this approach has issues, but I still prefer it for
> the problem I am solving (putting banking details on an invoice BTW)

What exactly are you trying to do?  I don't understand your issue about
"putting banking details on an invoice".  Why can't you just put this
info into the invoice template?

> Thanks,
> Philip

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list