[GNC-dev] Update Wiki Custom Report
flywire
flywire0 at gmail.com
Sat Apr 8 19:54:55 EDT 2023
I do:
https://wiki.gnucash.org/wiki/index.php?title=Custom_Reports&action=history
but docs need some level of overview by Subject Matter Experts or they
become social media.
There are breaking changes in
https://github.com/Gnucash/gnucash/releases/tag/5.0
Report and Book Options
>
> - This major change will affect everyone who has written custom
> reports in Guile Scheme.
> - The report and book options code has been completely rewritten in
> C++ with SWIG providing Guile Scheme access for reports. The new design
> requires directly registering options with for example
> gnc-optiondb-register-string-option instead of calling
> gnc:make-string-option to create an option followed by gnc:register-option
> to insert it in the report's options.
> - Value access is also changed: Instead of retrieving an option and
> then querying or setting its value with gnc:option-value one will query the
> optiondb with gnc-option-value, the arguments to which are the optiondb,
> the section, and the option name.
> - Supporting the new options backend the options dialog code in
> gnc-dialog-options, gnc-business-options, and the new gnc-option-gtk-ui
> have also been rewritten in C++.
>
> Reflecting on the changes I made to
https://github.com/Gnucash/gnucash/blob/5.0/gnucash/report/reports/example/sample-report.scm
to incorporate these changes, despite being checked by John Ralls, I don't
understand them in the context of the release comments. I very much
followed the approach in the wiki of finding something similar in an
existing report and copy/adapt it. Why is there still a lot of "gnc:" in
reports? Is sample-report still using code that is to be depreciated?
As I see it the page needs (note 2 & 3 highlighted, might only require a
paragraph in each to explain the changes):
1. all content prior to V5 removed with an introductory comment for
previous version linking to
https://wiki.gnucash.org/wiki/index.php?title=Custom_Reports&oldid=21469
(I'll do this after 24hrs if there are no objections)
2. * update
https://wiki.gnucash.org/wiki/Custom_Reports#The_Options-Generator *
3. * update
https://wiki.gnucash.org/wiki/Custom_Reports#The_Report-Renderer *
4. fix reports example prototype bug: gnc:optname-reportname - I have no
idea why it doesn't work
5. points 2 & 3 should allow anyone to fix the rest of
https://wiki.gnucash.org/wiki/Custom_Reports#Designing_new_Reports
Other comments:
The guide is so Linux-focused that most of it is non-functional in Windows
(debugging, API, adding menu items):
1. I'm not clear on using
https://wiki.gnucash.org/wiki/Custom_Reports#The_GnuCash_API but
clearly, that saves the need for an existing report example. I'd like to
see the API demonstrated as an MWE (eg point 4 above), preferably using the
V5 breaking changes.
2. particularly
https://wiki.gnucash.org/wiki/Custom_Reports#Technique_to_reload_reports_without_restarting_GnuCash
and all of https://wiki.gnucash.org/wiki/Custom_Reports#The_GnuCash_API
btw, Maybe the menu item Help, About GnuCash Needs a link directly to the
reports folder.
On Sun, 9 Apr 2023 at 08:06, Frank H. Ellenberger <
frank.h.ellenberger at gmail.com> wrote:
> Do you have no wiki account?
>
> Am 03.04.23 um 05:04 schrieb flywire:
> > Can someone update https://wiki.gnucash.org/wiki/Custom_Reports to
> provide
> > for the changes in V5?
> > _______________________________________________
> > gnucash-devel mailing list
> > gnucash-devel at gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
More information about the gnucash-devel
mailing list