1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;; welcome-to-gnucash.scm : very minimalistic sampe report
3;;                          can be used as skeleton to make new reports
4;; Copyright 2001 Bill Gribble <grib@gnumatic.com>
5;;
6;; This program is free software; you can redistribute it and/or
7;; modify it under the terms of the GNU General Public License as
8;; published by the Free Software Foundation; either version 2 of
9;; the License, or (at your option) any later version.
10;;
11;; This program is distributed in the hope that it will be useful,
12;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14;; GNU General Public License for more details.
15;;
16;; You should have received a copy of the GNU General Public License
17;; along with this program; if not, contact:
18;;
19;; Free Software Foundation           Voice:  +1-617-542-5942
20;; 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
21;; Boston, MA  02110-1301,  USA       gnu@gnu.org
22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
23
24(define-module (gnucash reports example welcome-to-gnucash))
25
26(use-modules (gnucash engine))
27(use-modules (gnucash utilities))
28(use-modules (gnucash core-utils)) ; for gnc:version and (G_ ...)
29(use-modules (gnucash app-utils))
30(use-modules (gnucash report))
31
32(define (options)
33  (gnc:new-options))
34
35(define (renderer report-obj)
36  (let ((doc (gnc:make-html-document)))
37    (gnc:html-document-add-object!
38     doc
39     (gnc:make-html-text
40      (gnc:html-markup-h3
41       (format #f (G_ "Welcome to GnuCash ~a !")
42               gnc:version))
43      (gnc:html-markup-p
44       (format #f (G_ "GnuCash ~a has lots of nice features. Here are a few.")
45               gnc:version))))
46    doc))
47
48(gnc:define-report
49 'name (N_ "Welcome to GnuCash")
50 'version 1
51 'report-guid "65135608f2014c6ca8412793a8cdf169"
52 'menu-path (list gnc:menuname-example)
53 'options-generator options
54 'renderer renderer)
55