-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL
93 lines (54 loc) · 2.51 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
NCReport Installation Instructions
==================================
Before compiling NCReport you will need to have the appropriate Qt
libraries installed on your system. In addition, NCReport currently
tested with the MySql database using Qt's QMYSQL driver. At this
time, if you wish to use a different driver you will have to compile the
appropriate Qt drivers and make any changes necessary to NCReport to
support driver specific code.
To compile NCReport run the followings:
=======================================
untar/unzip ncreport???.tar.gz
change to ncreport directory
qmake
make
This will compile NCReport into a command line executable binary file.
If you'd like to use NCReport classes in your Qt application and not as
command line tool, you may analyze main.cpp how can the class be used.
How to use NCReport:
====================
Please learn the main.cpp sample. The sample code describes the way of
usage. The suggested order in your code:
1. create your qt application object
2. connect to a database
3. create ncreport object
4. set initial options
5. add parameters (optional)
6. set output ( printer/preview/pdf )
7. run report with ->runReport()
To run sample reports:
======================
Before all create database/tables. NCReport currently tested with the
MySql database. Sql script is located in /northwind directory. The script
creates mysql sample tables and sample datas. (Samples certainly need
installed and running mysql database server)
Use the main testform contained in the project to try or test your reports!
Command-line start sample reports:
==================================
To run (print) examples from ncreport directory :
./ncreport n -print
To run (preview) examples from ncreport directory :
./ncreport n -preview
To run (pdf) examples from ncreport directory :
./ncreport n -pdf
(where n=0 -> price list, n=1 -> invoice, n=2 -> price list with total groups)
Use as command line tool:
=========================
If you want to use NCReport as command line tool uncomment the MODE_COMMANDLINE
define. See the "start_sample..." scripts how to use NCReport as a command line
tool. You may also start the sample script(s). The sample report
definition XML files are in /samples directory.
To use the program, always change to ncreport directory. The report engine
and the preview use files relative from this directory.
To show command line help in command line mode:
ncreport -help