[GNC] Report headings, can one separate the company name from the report name?
Chris Green
cl at isbd.net
Thu Oct 1 04:53:22 EDT 2020
On Thu, Oct 01, 2020 at 12:23:02PM +0800, Christopher Lam wrote:
> On Thu, 1 Oct 2020, 12:42 am Chris Green, <cl at isbd.net> wrote:
>
> > On Mon, Sep 28, 2020 at 09:04:28PM +0100, Chris Green wrote:
> > > I have just been looking at and printing some reports, the 'Company
> > > Name' set in Properties is just put on the same line as the report
> > > name.
> > >
> > > Is there any way to get the Company Name on a line by itself at the
> > > top of the report?
> > >
> > No answers? It seems such an obvious thing to want to do.
> >
> > Anyway I've found a bit of a 'hack' that does what I want. Since the
> > reports are all HTML then one can add HTML to the strings in options.
> >
> > I just changed the business name from "This is my business name" to
> > "This is my business name<BR>" and now it appears in a line by itself
> > at the top of the report.
> >
> Please be aware that inserting raw HTML into textual fields in datafile or
> report options is a wart and will very likely be sanitized in the future.
> At best, simple formatting elements e.g. multiline into <br/> tags are
> already possible in some report options.
>
> The reason is it's not difficult to craft a data file containing html and
> JavaScript and can damage the data file or the underlying file system.
>
That's exactly why I called it a hack. :-)
I've actually now dug down into the scheme files that generate the
reports and they're not as frightening as I thought from looking at
the documentation. So I'll modify and customise reports by adapting
the scheme files.
--
Chris Green
More information about the gnucash-user
mailing list