[GNC] Report - Income Statement - Layout problem

Adrien Monteleone adrien.monteleone at lusfiber.net
Mon Mar 21 22:47:32 EDT 2022


I can reproduce with 4.9 on BigSur.

Investigating using Firefox Inspector to view the HTML, I see that there 
is padding being added to the Expenses section.

For me, this only happens at depths 5,6, & ALL.

It seems the left hand column where the labels are, is expanding to fit 
the depth of accounts requested *and* the text of those account names.

In my case, my Expense depth is greater than my Income depth. (which is 
capped at 4, and thus why I see the bug appear at 5 or higher)

I also happen to have a few accounts with long names, so the effect is 
not as great for me as for the OP, but it seems this string length will 
influence the calculated width.

The effect shows up because the Expense section and the Income section 
are two separate HTML tables, and thus their columns are sizing 
independent of each other to contain their respective content.

One possible fix (while still using tables) is to make the entire report 
a single table though that would of course require a bit of visual 
tweaking to get back to what it looks like now.

In the meantime, I'm investigating replacing the inserted ' ' as an 
account label indention mechanism, with something else. (either another 
empty <td> and thus another column, or a means to pad the cells via CSS)

There might be a 'non-table' solution, but that too would take quite a 
bit of investigation and a complete re-write of the report(s) affected.

Regards,
Adrien

On 3/20/22 5:02 PM, John Ralls wrote:
> I can't reproduce that here. Does that happen with all of the stylesheets? Have you perhaps modified the Technicolor stylesheet so that the Revenue block is smaller than the Expenses one?



More information about the gnucash-user mailing list