r16856 - gnucash/trunk/src/report/standard-reports - possible fix for piechart crasher -- add report-guid to sub-report links

Andrew Sackville-West andrewsw at cvs.gnucash.org
Mon Jan 14 14:03:12 EST 2008


Author: andrewsw
Date: 2008-01-14 14:03:11 -0500 (Mon, 14 Jan 2008)
New Revision: 16856
Trac: http://svn.gnucash.org/trac/changeset/16856

Modified:
   gnucash/trunk/src/report/standard-reports/account-piecharts.scm
Log:
possible fix for piechart crasher -- add report-guid to sub-report links


Modified: gnucash/trunk/src/report/standard-reports/account-piecharts.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/account-piecharts.scm	2008-01-13 14:49:47 UTC (rev 16855)
+++ gnucash/trunk/src/report/standard-reports/account-piecharts.scm	2008-01-14 19:03:11 UTC (rev 16856)
@@ -156,7 +156,7 @@
 ;; account settings, you have to give the reportname, the
 ;; account-types to work on and whether this report works on
 ;; intervals as arguments.
-(define (piechart-renderer report-obj reportname
+(define (piechart-renderer report-obj reportname report-guid
                            account-types do-intervals?)
   
   ;; This is a helper function for looking up option values.
@@ -335,7 +335,7 @@
                   (set! combined
                         (append start
                                 (list (list sum (_ "Other")))))
-                  (let ((options (gnc:make-report-options reportname))
+                  (let ((options (gnc:make-report-options report-guid))
                         (id #f))
                     ;; now copy all the options
                     (gnc:options-copy-values (gnc:report-options report-obj)
@@ -345,7 +345,7 @@
                      (gnc:lookup-option options gnc:pagename-accounts 
                                         optname-accounts)
                      (map cadr finish))
-                    (set! id (gnc:make-report reportname options))
+                    (set! id (gnc:make-report report-guid options))
                     ;; set the URL.
                     (set! other-anchor (gnc:report-anchor-text id)))))
             
@@ -367,7 +367,7 @@
                                ;; immediate subaccounts of this account
                                ;; (and including this account).
                                (gnc:make-report-anchor
-                                reportname
+                                report-guid
                                 report-obj
                                 (list
                                  (list gnc:pagename-accounts optname-accounts
@@ -475,6 +475,7 @@
       'renderer (lambda (report-obj)
 		  (piechart-renderer report-obj 
 				     (car l) 
+				     (car (reverse l))
 				     (cadr l)
 				     (caddr l))))))
  (list 



More information about the gnucash-changes mailing list