Where are the styles for reports set?
Katie Eldridge
eldridgetideswell-katie at yahoo.co.uk
Mon Jul 4 05:42:05 EDT 2016
Hi Jonatan,
I can't fully answer your question, but can give some insight...
When the business reports were first created, gnucash used a web
rendering engine which didn't really understand css. This means that a
lot of the styles are hard-coded into the reports, as that was the only
way to enable this. Gnucash now uses webkit and can understand css, but
the code for the business reports mostly still use the old system.
The 'eguile' reports do understand css, but not all the reports are
available in this format, and the ones that do exist still need some
work, but it's not a high priority of the core developers because it's
easy to export the data if you want a report to look different (for
example by copying and pasting the report data into a word processor).
If it's mainly just the invoices and/or balance sheet you need to style,
then try the 'Tax invoice' and 'Balance sheet using eguile-gnc' to see
whether you can adapt these to your requirements. I'm currently trying
to update the tax invoice to make using css easier, but I don't have
much spare time to do this (I've done a version for my own needs, but
'cheated' by hard-coding a few things I didn't need to change, so I need
to make it more generic). My intention is that all the tax invoice
styling will be easily controllable by css (some is currently hard coded
or uses tables for layout rather than just for tabular data).
Not sure what operating system you're using, but in Linux Mint the
reports are in /usr/share/gnucash/scm/gnucash/report
The tax invoice for example has taxinvoice.eguile.scm and taxinvoice.css
- the first of these is where the html is (there's also taxinvoice.scm
which is the bit that actually extracts the data), and the second is
just a normal css file.
Hope that at least helps a bit!
Katie
On 03/07/16 05:36, Jonatan Wentzel wrote:
> Hi,
>
> I'm a newbie at GnuCash that is trying to modify the reports to fit my
> business and how reports usually look in my country. I've come quite far,
> but when it comes to styling my report I feel lost. I can't seem to find
> any resources about hos the stylesheets for the reports work. I'm using one
> of the default stylesheets (stylesheet-footer.scm), and I've managed to add
> new classes. But where do I actually specify the css for that particular
> class? I can't even seem to find where figures like the subtotal is defined
> as bold.
>
> If anyone can help me understand this, I would be so happy! It could be
> either by explaining how it works, or by pointing me at some kind of
> documentation, or even just to inform me where the styles for the
> transaction report with the footer stylesheet is set.
>
> Thank you all,
> Jonatan
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
More information about the gnucash-user
mailing list