Opening saved account reports

Mike Alexander mta at umich.edu
Thu Oct 19 15:42:42 EDT 2006


I'm in the process of getting things to work again after updating to 
the swig version of gnucash.  It mostly seems to work, but I've noticed 
a few things.

For example, when I opened a file that had an Account Report (or 
Account Transaction Report) window open when it was saved in the g-wrap 
version of gnucash I got the error:

register.scm:564:17: In procedure gnc_query_scm2compare in expression 
(gnc-scm2query query-scm):
register.scm:564:17: Wrong type argument in position 1: 
query-compare-equal

The code in register.scm gets the query from a parameter passed in to 
it by the C code.  In this case the query it gets is

(query-v2 (terms (((("book" "guid") #f guid query-compare-equal 
guid-match-any ("6320ae727a3710d93d3ca7b097c43157")) (("account" 
"guid") #f guid query-compare-equal guid-match-any 
("ab40d43d2091ea21672ec1ba2113b630"))))) (search-for Split) 
(primary-sort (("QofQueryDefaultSort") 0 #t)) (secondary-sort #f) 
(tertiary-sort #f) (max-results -1))

If I run the report again after opening the file it gets a different 
query:

(query-v2 (terms (((("book" "guid") #f guid 3 1 
("6320ae727a3710d93d3ca7b097c43157")) (("guid") #f guid 3 1 
("4055379c49a2142af5dc7ef59bd1ce49"))))) (search-for Split) 
(primary-sort (("QofQueryDefaultSort") 0 #t)) (secondary-sort #f) 
(tertiary-sort #f) (max-results -1))

It looks like the symbols query-compare-equal and guid-match-any have 
been turned into numeric parameters in the new query.  (The GUIDs 
changed since I probably selected a different account.)  I don't know 
whether the bug is in the processing of the query or the generation of 
the query.

This isn't a big deal since it only seem to affect documents with saved 
reports, but it might be a symptom of a wider problem (or it might be 
something I'm doing wrong).

-- 
Mike Alexander           mta at umich.edu
Ann Arbor, MI            PGP key ID: BEA343A6




More information about the gnucash-devel mailing list