Adding custom report to a custom sub-menu

serge45 at free.fr serge45 at free.fr
Thu Feb 26 10:24:48 EST 2026


Hi experts,

Running GnuCash 5.14 on Windows.

I've created a custom report just by duplicating the sample-report.scm,
changing its name and uuid. It's working fine from the Reports/Sample Report
menu.

Now I'd like to make it available in a custom sub-menu of the standard
Reports menu.

In the config-user.scm, I've added these lines in order to create the
sub-menu and load my custom report :

 

(export gnc:menuname-perso)

(define gnc:menuname-perso (N_ "Perso"))

(define perso-menu

                (gnc:make-menu gnc:menuname-perso (list
gnc:menuname-reports)))

(gnc-add-scm-extension perso-menu)

(load (gnc-build-userdata-path "myreport.scm"))

 

In myreport.scm, the gnc:define-report call has this parameter :

'menu-path (list gnc:menuname-perso)

 

The sub-menu is well created and displayed, but it is empty. My custom
report is displayed at the root of the standard Reports menu.

Could you help me moving it to my custom sub-menu ?

Thanks,

Serge

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20260226/7afa94ef/attachment.htm>


More information about the gnucash-devel mailing list