Add Additional Column to Register Report (PATCH INCLUDED)

Charles Day cedayiv at gmail.com
Wed Jun 25 12:35:56 EDT 2008


On Wed, Jun 25, 2008 at 12:19 AM, Robert Stocks <robert.stocks at gmail.com>
wrote:

> 2008/6/24 Charles Day <cedayiv at gmail.com>:
> > Robert, did you realize that the register report already shows memos if
> the
> > "Description" display option is checked? It puts them on the split lines
> > underneath the "Description" heading.
> >
> > Checking or unchecking the new "Memo" option that you've added didn't
> seem
> > to make any difference to the report output in my testing. I don't even
> see
> > a new column heading, for example. Perhaps (opt-val "__reg" "journal") is
> > always evaluating to #t for some reason. Any advice on how to get the new
> > column to appear?
> >
> Charles,
>
> Thanks for looking at this.
>
> I worked out that  (opt-val "__reg" "journal") is set based on the
> view the register is in when you open the report,
> setting it to Single Line provides the #f in this option.
>
> The reason I put the test for (opt-val "__reg" "journal") was because
> the memo option is redundant when the register is set to show splits.
>

But the "Memo" report option shouldn't become completely disabled just
because of how the register is being viewed. I think the memo option should
be checked by default, but if you feel that this is redundant for this
particular situation then why not just run the report with the memo option
automatically "unchecked"? (And if completely disabling the option was the
right thing to do then the user should still get a visual indication, like
the Memo option being greyed out.)

I refer you to my requirement (producing a report for a "Loan to:
> Friend" account.)
>
> I need the Split Memo, Date, Amount and Description for those parts of
> the split that affect the selected account only, and do not want to
> see any other parts of the split.
>
> Example Transaction Phone bill (2 phones on account one is mine other
> is a friends)
> Date: 1/1/2008
> Description: T-Mobile
> Memo:   (Wow {friend} spent a lot this month)
>
> Split Memo    , Account                                  , Debit   , Credit
>                     , Assets:Bank Account              ,100.00 ,
> Phone Rental  , Expenses:Phones:Line Rental ,           , 25.00
> Phone Calls    , Expenses:Phones:Calls          ,           ,  5.00
> Phone Rental  , Assets:Loans to:{friend}          ,           , 25.00
> Phone Calls    , Assets:Loans to:{friend}          ,           , 45.00
>
>
> My report can be configured to show
>
> 1/1/2008 T-Mobile Phone Rental  ,           , 25.00
> 1/1/2008 T-Mobile Phone Calls    ,           , 45.00
>
> and not show the snarky comments in the main memo field, or how much I
> spent on my phone calls.
>

If I have understood, you want the transaction's Description field to be
optional, the transaction's Notes field to be optional, and the Memo field
of the splits to be optional. That's fine, but I don't understand why a new
column needs to be added to the report. All of these fields can be displayed
in one column, which uses the space better, and the unpatched report already
works that way.

Why not just add a Notes checkbox option and a Memo checkbox option to the
report that causes the unwanted fields to disappear. If all three options
are unchecked (Description, Note, Memo) then the entire column can be left
out.

On a related point, it would be nice if the automatic properties of
> this report where ALSO available to change in the options dialog after
> creating it. (I will take a look at implementing this, when I get some
> spare time)
>

I'm not quite sure what you mean here. Are you talking about being able to
change the defaults for the next time the report runs?

Cheers,
Charles

--
> Robert
>


More information about the gnucash-devel mailing list