Error running cashflow report
Derek Atkins
warlord at MIT.EDU
Sun Feb 2 12:39:00 CST 2003
Hi,
Laurent Duperval <lduperval at videotron.ca> writes:
> Howdeeeeee!
>
> So I just updated the CVS version to get the new cashflow report. When I
> run it on last year's numbers, I get this:
[snip]
> 25* [string<? Expenses:Insurance:Life Insurance:Laurent #f]
> /usr/local/share/gnucash/guile-modules/gnucash/report/cash-flow.scm:183:7: In procedure string<? in expression (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)):
> /usr/local/share/gnucash/guile-modules/gnucash/report/cash-flow.scm:183:7: Wrong type argument in position 2 (expecting ROSTRINGP): #f
How... ODD. It looks like it's trying to compare
"Expenses:Insurance:Life Insurance:Laurent" against #f, which seems to
imply that somehow '#f' is getting into your list of accounts.
Without seeing your data file, I'm not sure what to tell you. I've
got a potential patch to fix the symptom, but it wont fix the actual
problem. Indeed, I have no clue what your actual problem is...
If you could send me your datafile and the cash-flow configuration you
used I could try to track down the actual problem. In the meantime,
can you try this patch and let me know if it fixes the symptom?
Index: src/report/standard-reports/cash-flow.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/cash-flow.scm,v
retrieving revision 1.7
diff -u -r1.7 cash-flow.scm
--- src/report/standard-reports/cash-flow.scm 31 Jan 2003 03:00:50 -0000 1.7
+++ src/report/standard-reports/cash-flow.scm 2 Feb 2003 17:36:12 -0000
@@ -180,7 +180,10 @@
;; helper for sorting of account list
(define (account-full-name<? a b)
- (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)))
+ (cond ((and a b)
+ (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)))
+ ((not b) #f)
+ (#t #t)))
;; helper for account depth
(define (account-get-depth account)
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list