Adding custom report to a custom sub-menu
serge45
serge45 at free.fr
Fri Feb 27 08:02:33 EST 2026
Great ! Thanks for the investigation !I thought the accelerator key was not mandatory. Maybe it is added automatically when not specified, thus changing internally the menu name.Have a good weekend. Serge
-------- Message d'origine --------De : Robert Fewell <14ubobit at gmail.com> Date : 27/02/2026 13:21 (GMT+01:00) À : serge45 at free.fr Cc : gnucash-devel at gnucash.org Objet : Re: Adding custom report to a custom sub-menu OK, it has something to do with adding the accelerator key to the menu.I can get it to work by predefining it, changing to this...(define gnc:menuname-perso (N_ "_Perso"))
Will look further over the weekend.Regards,Bob
On Fri, 27 Feb 2026 at 11:52, Robert Fewell <14ubobit at gmail.com> wrote:Hi,I do not think I tested using a sub menu for a custom report when the menus were changed, it looks OK and if you run with debugging I can see the 'Personal' menu being created but the custom report is not being added under it.I will have a look over the weekend.Regards,BobOn Thu, 26 Feb 2026 at 15:26, <serge45 at free.fr> wrote: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 _______________________________________________
gnucash-devel mailing list
gnucash-devel at gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20260227/1ec54d97/attachment.htm>
More information about the gnucash-devel
mailing list