Help with modifying Budget Report
Josh Sled
jsled at asynchronous.org
Wed Feb 7 18:51:47 EST 2007
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.
--
...jsled
http://asynchronous.org/ - a=jsled;b=asynchronous.org;echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20070207/a3db2121/attachment.bin
More information about the gnucash-user
mailing list