Add Additional Column to Register Report (PATCH INCLUDED)

Charles Day cedayiv at gmail.com
Fri Jun 27 19:09:01 EDT 2008


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

> 2008/6/25 Charles Day <cedayiv at gmail.com>:
> > 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.)
>
> Greying out the option sounds good - how do you do that? (remember
> this is my first experience of programming both scheme and GnuCash)
>

I think I finally see what you mean here: (1) in the unpatched report there
is no way to make split memos appear if you run the "Account Report" from
Basic Ledger mode, and (2) in this case it makes more sense, space-wise, to
display the notes in a separate column rather than double the number of
lines in the report.

Here's how I'd prefer to see it: We'd need two report option checkboxes:
Description and Memo. Both options would always be on by default, but these
options would never be disabled/greyed out; the user would be free to change
each of them after the report is initially run. For each option, if it is
checked then that piece of data will be displayed. Otherwise it will not.

As far as how the information is arranged on the report page:
1. In Basic Ledger mode, Description and Memo would appear in separate
columns to save vertical space.
2. In all other modes, Description and Memo would appear in the same column
to save horizontal space.

That's not a big change from what you have already. How does that sound?

It would be nice to also have a Notes option to allow the user to display or
hide the transaction's Notes field after the initial run, but since that
really isn't in the scope of what you're trying to accomplish, let's not
worry about it.

-Charles

>
> >> 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.
>
> You have missed one key point - there are parts to this split that
> don't refer to this account that i need to not show.  And the way the
> report currently works you either - see all the splits (Journal Modes)
> or don't see the Memos (Single Line Mode)
> >
> >> 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?
> I am talking about the properties (like Journal/Single Line) - or
> account - or filter by -  that are picked up from the register view
> you started from, it would be nice to be able to change them, without
> having to go back to the register and start again.
> >
> > Cheers,
> > Charles
> >
> >> --
> >> Robert
> >
> >
>
> --
> Robert
>


More information about the gnucash-devel mailing list