diff options
author | John Wiegley <johnw@newartisans.com> | 2010-05-30 02:28:58 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-05-30 02:47:40 -0600 |
commit | 647d4aac2fa474085d01f7ea1cebdc34fafd64a6 (patch) | |
tree | c17157d73c3a9d5dd182a4b7b0896e4f31e318be /src/print.h | |
parent | a41d33fba37460587f59ea0349ac4947a4de9f3c (diff) | |
download | fork-ledger-647d4aac2fa474085d01f7ea1cebdc34fafd64a6.tar.gz fork-ledger-647d4aac2fa474085d01f7ea1cebdc34fafd64a6.tar.bz2 fork-ledger-647d4aac2fa474085d01f7ea1cebdc34fafd64a6.zip |
New: --group-by=EXPR and --group-title-format=FMT
The --group-by option allows for most reports to be split up into
sections based on the varying value of EXPR. For example, to see
register subtotals by payee, use:
ledger reg --group-by=payee -s
This works for separated balances too:
ledger bal --group-by=payee
Another interesting possibility is seeing a register of all the accounts
affected by a related account:
ledger reg -r --group-by=payee
The option --group-title-format can be used to add a separator bar to
the group titles. The option --no-titles can be used to drop titles
altogether.
Diffstat (limited to 'src/print.h')
-rw-r--r-- | src/print.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/print.h b/src/print.h index f323b153..5263ec91 100644 --- a/src/print.h +++ b/src/print.h @@ -62,6 +62,7 @@ protected: xacts_present_map xacts_present; xacts_list xacts; bool print_raw; + bool first_title; public: print_xacts(report_t& _report, bool _print_raw = false); @@ -69,8 +70,17 @@ public: TRACE_DTOR(print_xacts); } + virtual void title(const string&); + virtual void flush(); virtual void operator()(post_t& post); + + virtual void clear() { + xacts_present.clear(); + xacts.clear(); + + item_handler<post_t>::clear(); + } }; |