How can I report on all accounts under a particular parent account?
Mark Hanford
mark at hanfordonline.co.uk
Wed Sep 4 12:21:31 EDT 2013
On 4 September 2013 17:17, Derek Atkins <derek at ihtfp.com> wrote:
> Hi,
>
> On Wed, September 4, 2013 11:05 am, Mark Hanford wrote:
>> Hi, all.
>>
>> I'm using GC to track our personal finances, and have been using the
>> standard report "Expense Pie Chart".
>>
>> I've created a custom report from this with just a subset of accounts
>> (all those under my "Joint" account) which works fine. The problem is,
>> when I create new accounts under this (perhaps a new breakdown of
>> expenditures) I have to remember to edit the report to add the new
>> account(s) to it.
>>
>> Is it possible to set the report conditions to be "all accounts under
>> {this} account"?
>>
>> Currently it's using a discreet list:
>>
>> (let ((option (gnc:lookup-option options
>> "Accounts"
>> "Accounts")))
>> ((lambda (option) (if option ((gnc:option-setter option)
>> '("1d54f378bb7a8b0f6ecd79902ce54fee"
>> "578ff65f0e42e131e41b0e2ef028a02d" "2a66313aab08dcde48a688fda4a89498"
>> "0be05d94381c6f1dcbffb9f22a64efa9")))) option))
>
> Sorry, no, there is not. The general query object framework (QOF) upon
> which GnuCash was written does not know about the "Account Hierarchy", so
> there's no way for it to have special knowledge about it. In order to do
> what you want the QOF code would need to be extended to allow additional
> runtime-added predicates and add a new predicate that would perform
> type-specific checking.
Thanks for the info - doesn't solve my problem, but does save me
digging around for something that doesn't exist :)
I might try adding the selected accounts to the report, at least that
way I should spot any omissions. I've seen that in the example report
so should be able to cobble something together.
> Patches are always welcome.
Not quite ready to dev on C/Scheme yet, we'll see :)
>
>> Thanks,
>>
>> Mark
>
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
> -derek
> --
> Derek Atkins 617-623-3745
> derek at ihtfp.com www.ihtfp.com
> Computer and Internet Security Consultant
>
More information about the gnucash-user
mailing list