Non compatibility of Gnucash 2.2 with report from Gnucash 2.0

Thierry Scalais thierry.scalais at teledisnet.be
Sun Dec 23 15:27:03 EST 2007


Chris Shoemaker a écrit :
> On Wed, Aug 22, 2007 at 10:13:32PM +0200, Thierry Scalais wrote:
>   
>> Last year, I modified the advanced-portfolio report to add some useful 
>> functionality. I posted the report to this mailing list on September 
>> 2006. This reports worked fine with Gnucash 2.0.
>> (https://lists.gnucash.org/pipermail/gnucash-devel/2006-September/018530.html)
>>
>> Unfortunately, Gnucash 2.2 is not compatible with this report. The main 
>> reason is that a series of function definitions disappear. Indeed, the 
>> current advanced-portfolio report was modified to take account of these 
>> changes.
>>
>> I found in the changelog, a list of equivalence between the old 
>> definitions and the new ones. But, some definitions used in my report 
>> are not listed.
>>
>> So my question is:
>>
>> Is there, any where, a file that I could include in my report to 
>> retrieve the old definitions and so avoid a rewrite of my report?
>>     
>
> No, there is not.  We switched wrapper-generator tools from g-wrap to
> SWIG, so many identifiers changed.  If your report used a method that
> no other report used, there's a chance it's not being exported to
> guile anymore, but it's more likely that the names just changed.  Tell
> me what identifier you can't find anymore, and I'll see if I can help.
>
> -chris
>
>   
I solved my problem with a file (named compat20) that defines the old 
names. The file is joined to this mail. It is based on some of the sed 
scripts appearing in the file ChangeLog.2006 augmented of some 
definition (mainly because some sed script lines performed generic 
changes like change gnc:numeric to gnc-numeric). This file is loaded by 
the report.

It was not sufficient and I had to change some lines of code but I found 
the corrected lines in the original report (advanced-portofolio.scm).

I join my modified report. To use it you have to put both files in 
reports directory (in my case it is 
/usr/share/gnucash/guile-modules/gnucash/report/) and add the following 
line

(use-modules (gnucash report advanced-portfolio-new))

in the file "standard-reports.scm".

Meanwhile, I note that the basis value calculation based on the average 
value is wrong (the base value may even become negative). As well in my 
report than in the original one.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: advanced-portfolio-new.tgz
Type: application/unix-tar
Size: 14138 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20071223/184a4651/attachment-0001.bin 


More information about the gnucash-devel mailing list