After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 405750 - Improper column handling for totals in Transaction Report
Improper column handling for totals in Transaction Report
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
2.0.x
Other All
: Normal normal
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2007-02-08 14:53 UTC by James Strandboge
Modified: 2018-06-29 21:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updated file that corrects column alignment. (63.45 KB, text/x-scheme)
2011-04-13 19:07 UTC, Joshua
Details

Description James Strandboge 2007-02-08 14:53:25 UTC
Please describe the problem:
In the transaction report, if you choose 'Use Full Account Name?' or 'Use Full Other Account Name?' the total in the totals rows gets pushed out into an extra, superfluous column.  This causes print problems for gtkhtml, because the 'COLSPAN' is set to one higher than it should be.

With the following checked under Options/Display:
Date
Num
Description
Other Account Name
Running Balance
Totals

Then it displays (and prints correctly, at least at Application Font of 10).  However, if under Options/Display you check 'Use Full Other Account Name?'), and click Apply, then the total is pushed out to the right into an extra column, and printing results in the right side of the page being chopped off.

Looking at the exported HTML proves that in the first scenario above (the correctly displaying one), that COLSPAN is correctly set, but it is incorrectly set to one higher when 'Use Full Other Account Name?' is used.  If you manually change the HTML file of improperly displayed file to use the same COLSPAN values as the correct one, then it displays properly.


Steps to reproduce:



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Josh Sled 2007-04-21 17:47:09 UTC
Yup.
Comment 2 Joshua 2011-04-13 19:07:58 UTC
Created attachment 185901 [details]
Updated file that corrects column alignment.

It looks like alignment of totals is also not working in the GnuCash version I built on 2011-04-08 (svn r44b6981+).  The problem also affects the Other Full Account Name option, Account Code option, Other Account Code option and the Full Account Name and Account Code options in the sorting dialog (as far as I can tell).  I think this file corrects the problems for me, but it feels like there should be an easier way to accomplish the fixes.  In particular, the statements I added at line 409 seem inefficient, but I'm not a programmer and I can't figure out a better way to do it.

This file includes all original code (commented out) and my updates.  Please clean up the file, or let me know that this looks good, and I'll attach a clean version.

I think the only noticeable difference when using GnuCash was changing the Account Name and Full Account Name options so that only one can be chosen at a time.  Hopefully that is appropriate.  Would an option like the one for Memo/Notes be better?  Initial I would have done that, but I think there are some bugs with the logic that greys out the Notes option when the Memo option is not selected.

I left the Account Code options independent.

Also, I only use GnuCash for personal finances, and almost never look at the transactions report.  Someone who uses the Transactions report regularly should probably check my work before adding them to a new version of GnuCash.
Comment 3 Joshua 2011-04-14 16:08:35 UTC
I forgot to mention that this issue looks like it would affect any column that has a variable amount of information - the ones listed above as well as the Memo/Notes column.  So I included the Memo/Notes column in my fix, but there may still be some issues with that.

I don't think the logic for the Memo/Notes column will handle checking Notes and not Memo.  Normally, this isn't a problem since Notes is supposed to be grayed out when Memo is not checked.  But while I was testing the file I attached, I found that it was possible to uncheck Memo and leave Notes checked.  In that case, parts of the report either try to incorporate the Notes or include a column for Notes in various calculations.  I believe it's related to whether the options dialog has been closed and re-opened before changing selections.  If I can't find an existing bug, I'll file one.
Comment 4 Frank H. Ellenberger 2011-04-20 17:25:38 UTC
Joshua filed Bug 647805 - Inconsistent behavior of Memo/Notes check-boxes in Transaction Report Display Options
Comment 5 Carsten Rinke 2013-04-24 12:34:22 UTC
I tried this one with GnuCash 2.4.10 on Ubuntu 12.04 and it is working as expected. There are some line breaks included, and no info is lost or cut off.

To separate the transaction totals from the account balances appears to be intended behaviour, and looks ok to me.

@Joshua: Can you check whether this bug still shows up for you?
Comment 6 Joshua 2013-04-24 15:00:12 UTC
I can no longer reproduce the changes in location for totals with:

A build from r22264M on 2012-09-20
GnuCash 2.4.11
on
Ubuntu 12.10

(I'm pretty sure this is the packaged version in the Ubuntu 12.10 repository.)

The fix seems to keep totals in a separate column regardless of options selected, but I don't know where the fix was implemented.  The most recent code in SVN looks like it didn't change where I suggested.  I'm not even sure why I thought my changes, attached above, would work :-(

More importantly, the original bug reporter, James, had issues with printing when the totals were in a separate column.  Since I don't know what code changed, I'm not sure if his printing issues were fixed.

The HTML export on my report shows the heading cell in the rows for totals (ex. "Total for January 2013") set to a COLSPAN equal to the number of columns used above.  Then an additional cell is added (for the actual value of the total) with a COLSPAN of 1.  So the rows for totals still have a total COLSPAN of 1 more than the rest of the rows in the table.  I don't know enough about HTML offhand to know if this is "correct" but based on Jame's description, he may still have a problem printing.

Also, I still think there should some more control over what should be available for selection between Account Name, Use Full Account Name, and Code (similarly with Other Account Name, Use Full Other Account Name, and Other Code).

Specifically, assuming the actual report behavior in my version is the intended behavior, I think Use Full Account Name should be inactive unless Account Name is selected in the options window.
Comment 7 Geert Janssens 2013-12-08 15:01:23 UTC
Joshua,

Making Account Name and Use Full Account name depend on each other is not the subject of this bug. Can you please file a separate enhancement request for this ? That will make it easier to track.

I will close this bug as the original problem appears to be fixed. Should the issue still reappear, please feel free to reopen this bug.
Comment 8 John Ralls 2018-06-29 21:25:59 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=405750. Please update any external references or bookmarks.