Ready to start making a custom report

276 views
Skip to first unread message

ande...@gmail.com

unread,
Sep 16, 2016, 6:08:00 PM9/16/16
to Beancount
Start:  Just started using Beancount this month.  Yeah!  We get paid once a month.  Usually a day or five before the 1st of the month (depending on weekends, etc).  So our month starts with the paycheck and goes to the next and need to live within that.

Either way, I need to make a monthly expense report for a previous month and to be able to run it at any time within the middle of the current month.

I will need to break out various expenses:
. tithing  (currently set up as a Liability)
. Savings (money moved out to other accounts)
. Housing (mortgage, upkeep, savings to replace furnature, etc)
. Utilities (keep the lights on)
. Insurance
. etc, etc, etc

Just to see where the money is going.  And a custom report is the way to go....  Either way, I am searching around the various given reports and learning curve is there.  

Where would I put a custom report?  are there any examples (maybe a series of scripted query statements?)?  and where would I get some help with my first report?

Thank you.

  Craig A.

Martin Blais

unread,
Sep 16, 2016, 8:39:54 PM9/16/16
to Beancount
On Fri, Sep 16, 2016 at 6:08 PM, <ande...@gmail.com> wrote:
Start:  Just started using Beancount this month.  Yeah!  We get paid once a month.  Usually a day or five before the 1st of the month (depending on weekends, etc).  So our month starts with the paycheck and goes to the next and need to live within that.

Either way, I need to make a monthly expense report for a previous month and to be able to run it at any time within the middle of the current month.

I don't see any problem so far.


I will need to break out various expenses:
. tithing  (currently set up as a Liability)
. Savings (money moved out to other accounts)
. Housing (mortgage, upkeep, savings to replace furnature, etc)
. Utilities (keep the lights on)
. Insurance
. etc, etc, etc

Just to see where the money is going.  And a custom report is the way to go....  Either way, I am searching around the various given reports and learning curve is there.  

You might want to start here:

Likely the SQL report will be sufficient.
Otherwise, look into the income statement. What you seem to want is an income statement over a particular period of time, something like this:

  select account, sum(position) where date >= 2016-09-01 group by account

There's no arithmetic operations yet (I started, but it's unfinished), so you'll have to enter the date for now.

 
Where would I put a custom report?  are there any examples (maybe a series of scripted query statements?)?  and where would I get some help with my first report?

There are many example custom reports here: 
You would write your own reports script to invoke it (I haven't provided a way to register just a report class, not sure if it's wanted, nobody asked for it yet.)




 

Thank you.

  Craig A.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/83c96dea-0715-4905-a67c-7c7b9fc8c6a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ande...@gmail.com

unread,
Sep 16, 2016, 10:46:19 PM9/16/16
to Beancount
Just to see where the money is going.  And a custom report is the way to go....  Either way, I am searching around the various given reports and learning curve is there.  

You might want to start here:

Likely the SQL report will be sufficient.


Yes, this is the way I am going as this report is very customized for me and my family.  I am going to have to run multiple queries and then aggregate them into a report we want.  Not something I can 'push' to the world (yet).

I now started using the 'pushtag' and 'poptag' to add a month specific tag for a calendar 'month.'  Trying to get the query to work though...
'
pushtag #2016-09
2016-08-31 * "EFT TRANS - INAD ;0116;PAYROLL"
......  blah blah
poptag #2016-09
'
select * where '2016-09' in tags
works
select sum(cost(position)) where account ~ 'Income'
works, but
select sum(cost(position)) where account ~ 'Income' and '2016-09' in tags;
throws an error...

I'll keep plugging away at it, but I think I'm on the right path.  Thanks.

  Craig A.

Martin Blais

unread,
Sep 16, 2016, 11:50:00 PM9/16/16
to Beancount
If there's a better way to infer the time periods from something else I'd suggest not baking those periods into tags.

About the error: There's a little precedence bug with sets, just put parentheses around ('2016-09' in tags), it should work. Sorry about that, that's a known bug (I have an old ticket somewhere).




  Craig A.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.

Jacques Gagnon

unread,
Sep 17, 2016, 1:49:44 PM9/17/16
to bean...@googlegroups.com
I think I see what you want to do, I got the same issue to some level.

I got my mobile bill that is unfortunately set to be on the 31 somehow and so sometime it cross month boundaries.

So in my report for some month no mobile payment and the next one 2 mobile payment.

I dont want to tag nor cheat on the posting date. So I just live with it ;)

Maybe we need an optional "Bill period date"??

Ex:
PostingDate BillDate
2016-10-01 2016-09-30 * "MobilePhone"

And have the ability to query on either Posting or Billing dates??

This might had complexity for little gain however and probably most people dont need that either.

Jacques Gagnon
GTalk/E-Mail: darth...@gmail.com
WLM (MSN): clou...@msn.com

Martin Blais

unread,
Sep 17, 2016, 1:55:14 PM9/17/16
to Beancount
On Sat, Sep 17, 2016 at 1:49 PM, Jacques Gagnon <darth...@gmail.com> wrote:
I think I see what you want to do, I got the same issue to some level.

I got my mobile bill that is unfortunately set to be on the 31 somehow and so sometime it cross month boundaries.

So in my report for some month no mobile payment and the next one 2 mobile payment.

I dont want to tag nor cheat on the posting date. So I just live with it ;)

Maybe we need an optional "Bill period date"??

Ex:
PostingDate BillDate
2016-10-01 2016-09-30 * "MobilePhone"

And have the ability to query on either Posting or Billing dates??

The common names I'll eventually for this are:
- Transaction date (9/30 in your example)
- Settlement date (10/1 in your example)



Reply all
Reply to author
Forward
0 new messages