Datestamp on Reports
Michael Hendry
hendry.michael at gmail.com
Tue Oct 8 11:42:01 EDT 2013
On 8 Oct 2013, at 08:42, Michael Hendry <hendry.michael at gmail.com> wrote:
> On 7 Oct 2013, at 21:54, mcmurchy1917-gnucash at yahoo.co.uk wrote:
>
>> In my customised Balance report called balsheet-eg.eguile.scm
>>
>> I have this code -
>>
>> <br clear="both">
>> <center>
>> <p><?scm:d opt-extra-notes ?>
>> <p><?scm
>> (display (date->string (current-date) "Printed at ~d/~m/~Y ~H:~M:~S"))
>> ?>
>> </center>
>> <?scm (if (not css?) (begin ?>
>> </table> <!-- hack for GTKHTML -->
>> <?scm )) ?>
>>
>> </body>
>> </html>
>>
>> <?scm
>> ) ; enclosing let
>> ?>
>>
>>
>> Regards
>
> Thanks - that looks like the best route.
>
> Trying to avoid hacking, and use the tools provided, I'd been looking into making adjustments to the Stylesheets - in particular the Footer one.
>
> I found that simple HTML could be included, such as enclosing a string in <B>…</B> to make it appear in bold print, but then ran into the buffers when I found that HTML code couldn't be used to generate the current date, and that I couldn't readily use server-side code such as Javascript or PHP without putting my gnucash-generated HTML on a server.
>
> I shall study your code fragment, and once I understand what it's doing, I'll see if I get it to work for me.
>
> Regards
>
> Michael
PS
I've inserted the additional lines as above, but I get the following at the bottom of the report...
(Development version -- don't rely on the numbers on this report without double-checking them.
Change the 'Extra Notes' option to get rid of this message)
An error occurred when processing the template:
ERROR: Unbound variable: date->string
In current input:
30: 53* (let* (#) (letrec # # # ...))
?: 54 (letrec # # # ...)
307: 55* [display ...
307: 56* (date->string (current-date) "Printed at ~d/~m/~Y ~H:~M:~S")
…and I'm afraid the error messages don't mean a lot to me!
Michael
More information about the gnucash-user
mailing list