Trouble with custom report options
Jon Schewe
jpschewe at mtu.net
Sun Oct 1 17:55:14 EDT 2017
All,
I'm trying to create a report with some options that are disabled when
others are not selected. Below are my 2 options. When I select the Memo
option I get a critical error. Does anyone know why the set_selectable
field is null? Am I missing some initialization.
CRIT <gnc.app-utils> gnc_option_set_selectable: assertion
'option->odb->set_selectable != NULL' failed
(gnc:register-trep-option
(gnc:make-simple-boolean-option
gnc:pagename-display (N_ "Notes") "d2" (N_ "Display the notes if the
memo is unavailable?") #t))
;; Add an option to display the memo, and disable the notes option
;; when memos are not included.
(gnc:register-trep-option
(gnc:make-complex-boolean-option
gnc:pagename-display (N_ "Memo")
"d" (N_ "Display the memo?") #t
#f
(lambda (x) (gnc-option-db-set-option-selectable-by-name
gnc:*transaction-report-options*
gnc:pagename-display
(N_ "Notes")
x))))
Thank you,
- Jon
--
http://mtu.net/~jpschewe
More information about the gnucash-user
mailing list