Fixing Monthly Cash Flow Report (was Re: How to add reports into Gnucash)

David T. sunfish62 at yahoo.com
Sun Aug 23 02:13:58 EDT 2009


David--

I have poked around the Gnucash svn site looking for what to do, and I turned up a number of changesets revolving around renaming gnc: functions. These include: 14959, 14961, 14962, 14964, 14965, 14968, 14976, 14979, 14980, & 14981. Each of these included a set of string replacements, which I put into one big file and applied to toodles.scm using sed. The output file I named (for some reason) buggy.scm.

Unfortunately, even with these changes applied, I get errors. I see that I still have a lot of references to "gnc:" calls, which I gather from what I found on svn is being phased out for something better. Many of these calls didn't turn up in a search of the svn site, so I don't know what they ought to be.

I have attached both buggy.scm and the console output from the Gnucash session that would not load the report. If I am even remotely on the right path, please let me know, and if anyone has a suggestion on how to proceed from here, I would welcome that.

David

P.S.- I note that even though one of the lines included in the svn changesets changed gnc:get-current-group to gnc-get-current-group, that unbound error remains...

--- On Sat, 8/22/09, David Eisner <deisner at gmail.com> wrote:

> From: David Eisner <deisner at gmail.com>
> Subject: Re: How to add reports into Gnucash
> To: gnucash-user at gnucash.org
> Date: Saturday, August 22, 2009, 2:33 PM
> On Sat, Aug 22, 2009 at 12:06 AM,
> David T.<sunfish62 at yahoo.com>
> wrote:
> > I appreciate that you are offering to work on it this
> weekend. If there's anything I can do to assist you on that
> report, just let me know.
> 
> 
> The Good News:  To stop the Monthly Cash Flow report
> from crashing
> GnuCash, make the following two changes to your
> "toodles.scm" file:
> 
> 1. At the beginning of the file, comment out the first
> uncommented line:
>       (define-module (gnucash report
> cash-flow))
> 
> So change that to ";; (define-module (gnucash report
> cash-flow))"
> (note the two semi-colons that begin the line).
> 
> 2. At the end of the file, comment-out the *first*
> gnc:define-report
> procedure call (there are two, for some reason).  It
> should look like
> this when you're done:
> 
> ----8<----
> ;; (gnc:define-report
> ;;  'version 1
> ;;  'name reportname
> ;;  'menu-path (list gnc:menuname-income-expense)
> ;;  'options-generator cash-flow-options-generator
> ;;  'renderer cash-flow-renderer)
> 
> (gnc:define-report
>  'version 1
>  'name monthly-reportname
>  'menu-path (list gnc:menuname-income-expense)
>  'options-generator monthly-cash-flow-options-generator
>  'renderer monthly-cash-flow-renderer)
> ---->8----
> 
> Now GnuCash (2.2.9) will start up, and you'll have the
> "Monthly Cash
> Flow" report available in the menu.
> 
> 
> The Bad News:
> 
> The report doesn't work. [The Frogurt is also
> cursed.]  It looks like
> it's using the old Scheme API, which was changed with
> GnuCash 2.2.
> For example, you'll see this error:
> 
>  toodles.scm:247:33: Unbound variable:
> gnc:get-current-group
> 
> The gnc:get-current-group procedure is no longer available.
> [1]  So in
> order for this report to work with GnuCash 2.2.9, it would
> have to be
> ported.  I'm not sure how involved this would
> be.  Maybe Derek or
> somebody else can comment.
> 
> -David
> 
> [1] http://lists.gnucash.org/pipermail/gnucash-user/2007-November/022294.html
> 
> --
> David Eisner     http://cradle.brokenglass.com
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buggy.scm
Type: application/octet-stream
Size: 28313 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20090822/a54a9df0/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buggy-scm-errs.txt
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20090822/a54a9df0/attachment-0001.txt>


More information about the gnucash-user mailing list