1 |
This report demo uses a custom reporting template to |
This report demo uses a custom reporting template to |
2 |
summarize "Accounting Foobulations". |
summarize "Accounting Foobulations". |
3 |
|
|
4 |
To run (once it actually works): |
Files: |
5 |
|
monthly.grd Basic monthly report with parameter and triggers |
6 |
|
docbook.grd A report which directly produce docbook output. Don't |
7 |
|
use filter settings with this report. |
8 |
|
pg_schema.sql The database schema for both reports (in Postgresql SQL) |
9 |
|
|
10 |
|
monthly_i18n_zh.grd The monthly report translated to chinese. |
11 |
|
pg_schema_i18n_zh.sql Additional i18n data |
12 |
|
|
13 |
|
Monthly.grd |
14 |
|
=========== |
15 |
|
|
16 |
|
First install the schema: |
17 |
|
psql <dbname> < pg_schema.sql |
18 |
|
|
19 |
|
To run: |
20 |
grcvs monthly.grd subtitle="April 2002" begin="04/01/2002" end="04/30/2002" |
grcvs monthly.grd subtitle="April 2002" begin="04/01/2002" end="04/30/2002" |
21 |
|
|
22 |
You can try different filter settings: |
You can try different filter settings (like html, pdf, csv, text): |
23 |
grcvs --filter pdf -d test.pdf subtitle="April 2002" begin="04/01/2002" end="04/30/2002" |
grcvs --filter html -d test.html monthly.grd subtitle="April 2002" begin="04/01/2002" end="04/30/2002" |
24 |
|
|
25 |
|
You can even print it directly to a printer (or email or fax it): |
26 |
|
grcvs --filter pdf -D printer -d <printer name> monthly.grd subtitle="April 2002" begin="04/01/2002" end="04/30/2002" |
27 |
|
|
28 |
|
i18n |
29 |
|
==== |
30 |
|
|
31 |
|
To test the i18n version you have to set the textEncoding setting (in gnue.conf) |
32 |
|
to utf-8. For correct PDF file creation you have to edit /src/adapters/filters/SimpleTabulation/tabulator/formatters/pdf.py and set the font and boldfont settings to a font which supports unicode like Zenkai-Medium, Simsun, ArialUnicode etc. |
33 |
|
|
34 |
|
docbook.grd |
35 |
|
=========== |
36 |
|
|
37 |
|
To run: |
38 |
|
grcvs -d monthly_foo.xml docbook.grd subtitle="April 2002" begin="04/01/2002" end="04/30/2002" |
39 |
|
|
40 |
|
Now you can transform the docbook file to pdf, ps, ... with the xmlto commands. |
41 |
|
[this is broken at the moment as we don't produce 100% conformant docbook] |
42 |
|
|
43 |
|
xmlto pdf monthly_foo.xml > monthly_foo.pdf |
44 |
|
|
45 |
|
Attention: We create XML docbook here, so the db2xxx commands (for SGML db) don't work!!! |
46 |
|
|
47 |
|
|