Re: Average Monthly Expenses Report/Chart?

2002-02-22 Thread Christian Stimming

-BEGIN PGP SIGNED MESSAGE-

On Monday 11 February 2002 16:21, Chris Ingram wrote:
> My question is: How does everyone else generate reports and pie charts
> containing such average monthly expenses dollar amounts?  Is this
> currently possible?  

It is not possible currently. If I want to have averages, I open one expense 
piechart for the whole period, take my HP-48 (calculator) and calculate the 
result "by hand".

>However, there don't appear to be options to
> select the start date for the P&L report as "Start of previous month
> minus X" where X is could be 12 or 3 (or any other number of months I
> choose).

No, there is no such option at the moment. If you want to add these to the 
dropdown multi-choice list by yourself, you can do so relatively easily 
(provided you are willing to take the Scheme challenge). Changes in two files 
are required: In date-utilities.scm, you need to add a function to calculate 
the right relative date (just follow e.g.  gnc:get-start-prev-month). 
Additionally, this relative date option has to be added to the big lists in 
the function gnc:reldate-initialize, just the other examples. One more file 
change and you're done: In the file options-utilities.scm,  add the new date 
option to the lists in the functions gnc:options-add-report-date! and  
gnc:options-add-date-interval! . That's it, no more changes in any report 
code is required.

> Should I look into modifying the existing P&L report and Expense
> Piechart to have a "show average monthly dollars instead of total
> dollars" checkbox?  Where would I start looking to do such a thing?  

Just a rough hint: Dividing the amounts in the expense piecharts by some 
value (e.g. the number of months) would need to take place in file 
account-piecharts.scm line 249-250. The function collector->double returns a 
double value which can be divided by the number of months. To create an 
option choice box for this, follow the example for e.g. the show-total option 
in that file.  To get the number of months you can use the function 
gnc:timepair-get-month  and gnc:timepair-get-year from date-utilities.scm. 

If you have further questions, don't hesitate to ask and we'll try to assist 
you in your requests as quickly as possible. Thanks for your ideas.

Christian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iQCVAwUBPHalcGXAi+BfhivFAQHK5AP+PK+ktKdzwme6HiiQhXyRYri0A4my/9qo
Rln9spxAQpKhH8hAjKCCb41zCmM6ehaxbPBaMjCJa9TikZWLlzDwBcE0ccIbUOB2
6vm0tw95pJfnVO87s0XiiWriZ6FynmCT/synsK3jc6APzLwH0oz6rlyczwqF/INW
8CoJkiQn660=
=CzEA
-END PGP SIGNATURE-
___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Average Monthly Expenses Report/Chart?

2002-02-11 Thread Dave Peticolas

On Mon, 2002-02-11 at 07:21, Chris Ingram wrote:
> My question is: How does everyone else generate reports and pie charts
> containing such average monthly expenses dollar amounts?  Is this
> currently possible?  Also, is it possible to select dates like I
> mentioned (Previous month minus 12, etc.)?

I don't think you can currently generate reports like this.


> If not, should I look into modifying the existing P&L report and Expense
> Piechart to have a "show average monthly dollars instead of total
> dollars" checkbox?  Where would I start looking to do such a thing?  Is
> there any documentation available for creating/modifying reports and
> charts?  Should I also look into modifying these to be able to select
> the previous month minus X as a start/end date?

There is no documentation, just the existing reports.
A good place to start would be to study the existing
scheme source code for the reports.

Adding in the extension to the date choices would be
more work than just the checkbox, since you would need
to do some gui hacking in C as well.

dave




signature.asc
Description: This is a digitally signed message part