Decimal places in reports

Mike or Penny Novack mpnovack at mtdata.com
Tue Dec 29 11:00:54 EST 2015


On 12/29/2015 12:16 AM, David Solet wrote:
> Hello,
> Is there a way to format Gnucash reports so that the quantities are rounded
> to the nearest dollar? I find that people looking at these tables are
> distracted by the cents. I realize I can paste the reports into a
> spreadsheet and do the rounding myself, and am wondering if there is an
> option in Gnucash. Thanks for any information.
> David

There is a problem associated with automatic rounding to whole dollar. 
The operation "round" lacks an important mathematical property. Rounded 
(A) + Rounded (B) != Rounded (A + B).

That means that a set of books in balance (not rounded whole dollar) 
will not necessarily be a balanced set of books (rounded whole dollar).

In general, it will be necessary to "fudge" one or more amounts. Those 
here who are required to fill out governmental forms on a whole dollar 
balance (and that must be in balance with forms previously filed) 
probably know all about the issues. It generally takes me some time (an 
hour or two) to figure out a suitable fudging for a 990-EZ (must balance 
with previous) but quick and easy where a board wants a quarterly report 
displayed whole dollar and doesn't care if doesn't match the previous 
quarter by a dollar or two. Totally trivial if doesn't care if a current 
report is off by a dollar or two.

The problem with "unbalanced" is you can't tell if that was just from 
rounding error or not (in which case a small difference does NOT 
necessarily mean a small error.

What you perhaps want here is not an option to PRODUCE a report whole 
dollar but a function that takes a report xyz and returns a report whole 
dollar xyz (and you then fudge that if you have to). In general, when 
fudging you want to see the original amounts to decide how best (least 
distorting) to fudge. And this should be more general that simply whole 
dollar. Haven't you seen organizations where reports published in 
thousands, or even millions?

Michael D Novack


More information about the gnucash-user mailing list