Help with modifying Budget Report

ChrisW gnucash at thewests.net
Thu Feb 8 13:52:21 EST 2007


Thanks Josh,

That got me started and...
I now have a report that does what I want (although scheme made my head
hurt!)

I did struggle to find the gnc: functions to use. Is there anywhere
these are documented?

I have attached my report in case anyone else should find it useful.

Cheers
ChrisW


Josh Sled wrote:
> On Wed, 2007-02-07 at 19:57 +0000, ChrisW wrote:
>   
>> I am trying to create a new report based on the existing budget report
>> but modified so that the text in the "Actual" column is green when <= to
>> the budget figure and red when > budget.
>>
>> I can successfully load & run my new report using the "config.user"
>> method but I am struggling on how to change the code to format the cells
>> in the "Actual" column to be the required colour.
>>     
>
> Of course, in the budget.scm, you'll be looking to change around line
> 138, in gnc:html-table-add-budget-line! ... as for the selection,
> something like::
>
>     (cond ((<= act-val bgt-val) "green")
>           (#t                   "red"))
>
> ...should work alright.
>
>
> As for the color/font/style ... look at the hello-world report, which
> has at least a reference to (gnc:html-document-set-style! [...]
> font-color [...]).  Bear in mind that "stylesheet" there is a pre-CSS
> styling mechanism within gnucash, and gtkhtml only supports like HTML3,
> so we're talking font tags and what not.
>
> This is way harder than it should be.  :( Some future revision of the
> reports will address that, but for now it's the way it is.
>
>   
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: expenses-budget.scm
Url: http://lists.gnucash.org/pipermail/gnucash-user/attachments/20070208/0bf0860c/attachment.pl 


More information about the gnucash-user mailing list