GNOME Bugzilla – Bug 326150
Advanced Portfolio Report fails to generate due to number of digits specified as a float
Last modified: 2018-06-29 20:55:02 UTC
Please describe the problem: The advanced portfolio report allows one to specify the number of digits for listing the number of shares a user has. This value appears to be handled as a float, which causes an error: Wrong type (inexact) in position .... The report will not generate at all with this bug. Steps to reproduce: 1. Generate an Advanced Portfolio Report 2. 3. Actual results: Gnucash report that an error was generated during report generation. Expected results: A list of all shares, with price information and such like in a table. Does this happen every time? Yes. Other information: Linux 2.4.27/Debian (testing)/GnuCash 1.8.10/Guile 1.6.7 A workaround can be made by replacing line 42 of /usr/share/gnucash/guile-modules/gnucash/report/advanced-portfolio.scm with (define optname-shares-digits (N_ 3)) For 3 digit precision in the output table.
Please contact me at mtaschuk@ece.ualberta.ca if additional information or tests are required.
Other bugs concerning the Advanced Portfolio report are bug#105466, bug#115267, bug#314554 (maybe all three are duplicates of each other), bug#311549, bug#312049 .
Brian Lucas has found another workaround for this bug. His solution: I found the sticky file. In ~/.gnucash/books/ there is a file with a name corresponding to the pathname to your gnucash data file (with %2F instead of slashes in the pathname). Within that file, when you change the fractional digits in share amount, the following is added: (let ((option (gnc:lookup-option options "General" "Share decimal places"))) ((lambda (option) (if option ((gnc:option-setter option) 3.0))) option)) If you change the 3.0 to just 3, things appear to work for me.
This bug has been fixed in 1.9.x. I previously fixed it in 1.8.x by adding a call to inexact->exact in the appropriate place and when I merged that change to 1.9 I discovered it was already there. I don't know exactly when it was fixed. It occurred (and was fixed) in both the portfolio and advanced-portfolio reports.
Okay, I'll take your word for it that this is fixed in 1.9.0. I'm closing this bug.
*** Bug 133598 has been marked as a duplicate of this bug. ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=326150. Please update any external references or bookmarks.