• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Nov-2020-

MakefileH A D08-Nov-20201.5 KiB3827

READMEH A D08-Nov-20201.8 KiB5036

customers-report-docbook.cH A D08-Nov-20203.9 KiB12886

customers-report-rml.cH A D08-Nov-20203.8 KiB12785

customers-report-rml.rmlH A D08-Nov-20206 KiB122101

customers-report-spec.xmlH A D08-Nov-20206.2 KiB166141

customers-report.cH A D08-Nov-20203.5 KiB11978

schema-report-spec.xmlH A D08-Nov-20209 KiB255227

schema-report.cH A D08-Nov-20203.7 KiB12585

README

1Libgda Report engine example
2============================
3
4Description:
5------------
6
7The examples in this directory illustrate the GDA report engine, in the libgda-report component,
8part of libgda as of versions >= 4.0.
9
10In these examples the 'SalesTest' (this data source needs to be defined,
11which is automatically done when the first Libgda application is run, and uses a small SQLite database)
12is used as the source of data to generate a report.
13
14The first example (customers-report.c) takes the "customers-report-spec.xml" XML file which
15is a DocBook template (with some <gda_report_...> tags, creates a GdaReportEngine object to "execute" it
16and creates the "customers-report.xml" file (which returns a valid DocBook document).
17
18The second example (customers-report-rml.c) creates a GdaReportRmlDocument object which offers
19a higher level than the GdaReportEngine to work on RML files. It loads the "customers-report-rml.rml"
20RML file, and generates a PDF file from it.
21
22The 3rd example (schema-report.c) takes the "schema-report-spec.xml" XML file and created the "schema-report.xml"
23file (a valid DocBook document) which lists all the database schemas, the tables and views in the default schema
24along with their properties.
25
26Compiling and running:
27----------------------
28
29To compile (make sure Libgda is installed prior to this):
30> make
31
32and to run:
33> ./customers-report
34
35result is in the customers-report.xml file, which can be converted to HTML (in a customers-report.html file) as:
36> make html
37(make sure you set the correct path to the stylesheet in the Makefile)
38> firefox customers-report.html
39
40
41or, for the second example:
42> ./customers-report-rml
43> evince customers-report-rml.pdf
44
45and for the 3rd:
46> ./schema-report
47> make schema-html
48(make sure you set the correct path to the stylesheet in the Makefile)
49> firefox schema-report.html
50