<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body dir="auto">Great ! Thanks for the investigation !<div dir="auto">I thought the accelerator key was not mandatory. Maybe it is added automatically when not specified, thus changing internally the menu name.</div><div dir="auto">Have a good weekend. </div><div dir="auto">Serge <br><div dir="auto"><br></div></div><div><br></div><div align="left" dir="auto" style="font-size:100%;color:#000000"><div>-------- Message d'origine --------</div><div>De : Robert Fewell <14ubobit@gmail.com> </div><div>Date : 27/02/2026 13:21 (GMT+01:00) </div><div>À : serge45@free.fr </div><div>Cc : gnucash-devel@gnucash.org </div><div>Objet : Re: Adding custom report to a custom sub-menu </div><div><br></div></div><div dir="ltr"><div>OK, it has something to do with adding the accelerator key to the menu.</div><div><br></div><div>I can get it to work by predefining it, changing to this...</div><div><pre><i>(define gnc:menuname-perso (N_ "_Perso"))
<br></i></pre><pre><span style="font-family:arial,sans-serif"><i>Will look further over the weekend.<br></i></span></pre><pre><span style="font-family:arial,sans-serif"><i>Regards,<br></i></span></pre><pre><i><span style="font-family:arial,sans-serif">Bob</span>
<br></i></pre><pre><i><br></i></pre><br></div></div><br><div class="gmail_quote gmail_quote_container"><div class="gmail_attr" dir="ltr">On Fri, 27 Feb 2026 at 11:52, Robert Fewell <<a href="mailto:14ubobit@gmail.com">14ubobit@gmail.com</a>> wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div>Hi,</div><div>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.</div><div><br></div><div>I will have a look over the weekend.</div><div><br></div><div>Regards,</div><div>Bob</div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, 26 Feb 2026 at 15:26, <<a href="mailto:serge45@free.fr">serge45@free.fr</a>> wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div><div lang="FR"><div><p class="MsoNormal">Hi experts,<u></u><u></u></p><p class="MsoNormal">Running GnuCash 5.14 on Windows.<u></u><u></u></p><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal">Now I’d like to make it available in a custom sub-menu of the standard Reports menu.<u></u><u></u></p><p class="MsoNormal">In the config-user.scm, I’ve added these lines in order to create the sub-menu and load my custom report :<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">(export gnc:menuname-perso)<u></u><u></u></p><p class="MsoNormal">(define gnc:menuname-perso (N_ "Perso"))<u></u><u></u></p><p class="MsoNormal">(define perso-menu<u></u><u></u></p><p class="MsoNormal"> (gnc:make-menu gnc:menuname-perso (list gnc:menuname-reports)))<u></u><u></u></p><p class="MsoNormal">(gnc-add-scm-extension perso-menu)<u></u><u></u></p><p class="MsoNormal">(load (gnc-build-userdata-path "myreport.scm"))<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">In myreport.scm, the gnc:define-report call has this parameter :<u></u><u></u></p><p class="MsoNormal">'menu-path (list gnc:menuname-perso)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal">Could you help me moving it to my custom sub-menu ?<u></u><u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Serge<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
gnucash-devel mailing list<br>
<a href="mailto:gnucash-devel@gnucash.org">gnucash-devel@gnucash.org</a><br>
<a rel="noreferrer" href="https://lists.gnucash.org/mailman/listinfo/gnucash-devel">https://lists.gnucash.org/mailman/listinfo/gnucash-devel</a><br>
</div></blockquote></div>
</blockquote></div>
</body></html>