Question about Custom Report Options

Geert Janssens geert.gnucash at kobaltwit.be
Wed Jan 21 12:47:35 EST 2015


On Monday 19 January 2015 16:29:13 Sean McLennan wrote:
> Just looking for confirmation of a suspicion I have...
> 
> I'm building a custom report and ideally,

Hi Sean,

The term "custom report" can have several meanings. Based on your 
question I presume however you use it in the context of this wiki page:
http://wiki.gnucash.org/wiki/Custom_Reports

If that's a wrong assumption, please feel free to correct me.

> I would like to have a user
> select a vendor and then allow the user to select a payment from a
> list of payments made to that vendor.  I think this is *not* possible
> because you can't update the options windows based on selections made
> in the options window.  Is that correct?  (Open to thoughts on how to
> work around that if anyone has them!)
> 
(Sidenote: this is more a question for the gnucash-devel list. So I have 
taken the liberty to move the thread to that list.)

This should be possible. Each option can have a 
option-widget-changed-proc function that is called whenever the gui of 
the option changes.

You can find this in src/app-utils/options.scm
Also note the warning in that file: you should only use it to make gui 
changes, not internal option values.
Your case of changing the list of payments in a dropdown or list based 
on the selection of a specific vendor should normally be ok.

> I'm also assuming that there is no way to pass a transaction to the
> reporting tool? Say if the user selected the transaction in the
> register first and then opened the report like the check printing
> works?

I think you can. Take a look at how the Account Report and Account 
Transaction Report are handled. Both are only visible when the active 
tab is an account register.

And when you choose either report it will open a report based on the 
account associated with that register.

Does this help ?

Geert


More information about the gnucash-devel mailing list