App Delphi Component - Fastreport Manual.pdf
(
2489 KB
)
Pobierz
Îäèí ïðîõîä èëè äâà
FastReport v2.4
Report generator
Developer's manual
- 1 -
Table of contents
INTRODUCTION ............................................................................................................................................................. 5
PREFACE....................................................................................................................................................................... 6
COMMENTS ABOUT FASTREPORT ......................................................................................................................... 7
THE HISTORY OF FASTREPORT .............................................................................................................................. 8
B
UILDING REPORTS
.......................................................................................................................................................... 9
Data............................................................................................................................................................................ 9
Parameters ............................................................................................................................................................... 10
Forms ....................................................................................................................................................................... 10
Processing................................................................................................................................................................ 11
Preparing reports..................................................................................................................................................... 12
E
XAMPLE
:
BUILDING A SIMPLE REPORT
......................................................................................................................... 13
THE FASTREPORT KERNEL ..................................................................................................................................... 15
D
ELPHI COMPONENT PALETTE
....................................................................................................................................... 16
"FastReport" tab ...................................................................................................................................................... 16
"FR Tools" tab ......................................................................................................................................................... 18
TfrReport component ............................................................................................................................................... 19
TfrDBDataSet component ........................................................................................................................................ 22
TfrUserDataSet component...................................................................................................................................... 23
F
AST
R
EPORT OBJECTS
................................................................................................................................................... 24
The "Text" object...................................................................................................................................................... 25
The "Band" object .................................................................................................................................................... 28
The Picture object .................................................................................................................................................... 30
The SubReport object ............................................................................................................................................... 31
The Line object......................................................................................................................................................... 31
The CheckBox object................................................................................................................................................ 31
The RichText object.................................................................................................................................................. 32
The OLE object ........................................................................................................................................................ 32
The Chart object....................................................................................................................................................... 33
The Shape object ...................................................................................................................................................... 35
The Barcode object .................................................................................................................................................. 35
The RichText 2.0 object............................................................................................................................................ 36
B
UILDING THE REPORT
................................................................................................................................................... 37
Bands in the FastReport........................................................................................................................................... 38
Simple report (list) ................................................................................................................................................... 42
Master-detail report ................................................................................................................................................. 42
Master-detail-subdetail report ................................................................................................................................. 42
Cross-tab report....................................................................................................................................................... 42
Dynamic reports....................................................................................................................................................... 43
Broken bands ........................................................................................................................................................... 44
Multicolumn report .................................................................................................................................................. 45
Report with title page ............................................................................................................................................... 45
Nested reports (subreports)...................................................................................................................................... 45
Master-Detail-Detail report..................................................................................................................................... 45
Composite report...................................................................................................................................................... 46
Report with BLOb fields........................................................................................................................................... 46
Report without bands ............................................................................................................................................... 46
Report with groups................................................................................................................................................... 46
Report with charts .................................................................................................................................................... 47
THE DESIGNER ............................................................................................................................................................. 49
T
HE DESIGNER
............................................................................................................................................................... 50
Using the keyboard .................................................................................................................................................. 51
Using the mouse ....................................................................................................................................................... 51
Report options .......................................................................................................................................................... 52
Page options............................................................................................................................................................. 53
The “Paper” tab ...................................................................................................................................................... 53
The “Paper source” tab........................................................................................................................................... 53
The “Margins” tab .................................................................................................................................................. 53
Designer options ...................................................................................................................................................... 55
The Object Inspector ................................................................................................................................................ 57
- 2 -
The “Insert data fields” window.............................................................................................................................. 58
The Data dictionary ................................................................................................................................................. 59
The Expression builder ............................................................................................................................................ 64
"Insert data field" dialog ......................................................................................................................................... 64
"Insert variable" dialog ........................................................................................................................................... 64
"Insert function" dialog............................................................................................................................................ 65
Toolbars ................................................................................................................................................................... 67
The "Standard" toolbar............................................................................................................................................ 67
The "Text" toolbar.................................................................................................................................................... 68
The "Rectangle" toolbar .......................................................................................................................................... 69
The "Alignment " toolbar ......................................................................................................................................... 69
END-USER FEATURES ................................................................................................................................................ 71
I
NTRODUCTION
.............................................................................................................................................................. 72
T
HE DIALOGUE FORMS
................................................................................................................................................... 73
Dialogue Form Controls .......................................................................................................................................... 74
Label ........................................................................................................................................................................ 74
Edit ........................................................................................................................................................................... 75
Memo........................................................................................................................................................................ 75
Button ....................................................................................................................................................................... 76
CheckBox ................................................................................................................................................................. 76
RadioButton ............................................................................................................................................................. 77
ListBox ..................................................................................................................................................................... 77
ComboBox................................................................................................................................................................ 78
Passing the information to the Report ..................................................................................................................... 80
D
ATA ACCESS COMPONENTS
.......................................................................................................................................... 81
Description of FastReport DB-aware components .................................................................................................. 82
TfrBDELookupComboBox ....................................................................................................................................... 83
TfrBDETable............................................................................................................................................................ 83
TfrBDEQuery ........................................................................................................................................................... 86
TfrBDEDataBase ..................................................................................................................................................... 87
Building Reports ...................................................................................................................................................... 89
SIMPLE “TABULAR” TYPE REPORT ................................................................................................................... 89
Report with parameters............................................................................................................................................ 90
T
HE
T
FR
D
ATA
S
TORAGE COMPONENT
............................................................................................................................ 92
CONNECTING TO A DATABASE.......................................................................................................................... 92
OPENING A TABLE ............................................................................................................................................... 93
GENERATING A QUERY ........................................................................................................................................ 94
FIELDS EDITOR ..................................................................................................................................................... 95
CREATING LOOKUP FIELDS ............................................................................................................................... 96
QUERY PARAMETERS EDITOR ............................................................................................................................ 97
JOINING DATA ....................................................................................................................................................... 97
PARAMETERS DIALOG ......................................................................................................................................... 98
DESIGNER OF PARAMETERS DIALOG ............................................................................................................... 98
B
UILT
-
IN LANGUAGE
................................................................................................................................................... 100
Scripts and objects ................................................................................................................................................. 100
C
ODE WRITING
............................................................................................................................................................. 101
Objects modification .............................................................................................................................................. 103
Built-in functions.................................................................................................................................................... 104
Aggregate functions ............................................................................................................................................... 104
String functions ...................................................................................................................................................... 104
Properties and methods of objects ......................................................................................................................... 107
Using the interpreter .............................................................................................................................................. 118
PROGRAMMING......................................................................................................................................................... 119
E
VENT HANDLERS
........................................................................................................................................................ 120
Other events of TfrReport object............................................................................................................................ 120
V
ARIABLES
.................................................................................................................................................................. 122
E
XTENDING
F
AST
R
EPORT FUNCTIONALITY
.................................................................................................................. 124
Making your own preview windows ....................................................................................................................... 124
Expanding the functions list ................................................................................................................................... 125
EXAMPLES OF REPORTS......................................................................................................................................... 127
- 3 -
E
XAMPLES OF REPORTS
................................................................................................................................................ 128
Insertion of graphs and diagrams in the report ..................................................................................................... 129
Controlling the logic of report composition using the OnManualBuild event....................................................... 132
Manual report composition at runtime using code ................................................................................................ 133
Printing of column reports with variable or unknown number of columns ........................................................... 134
Column reports with variable width of the columns .............................................................................................. 136
- 4 -
INTRODUCTION
Preface
Comments about FastReport
The history of FastReport
Stages of building report
Building simple report
- 5 -
Plik z chomika:
mateusz00100
Inne pliki z tego folderu:
kurs php.zip
(586590 KB)
Video.Kurs.PHP.i.MYSQL.PL-R3R.iso
(587104 KB)
Kurs SQL.zip
(363307 KB)
Kurs_C++_Video.part1.rar
(683593 KB)
Kurs_C++_Video.part2.rar
(683593 KB)
Inne foldery tego chomika:
♣ Battlefield 3
♣ Mapy
♣ mody czerwca 2011
♣ mody wrzesień-sierpień 2011
♣ mody z pażdziernika 2011
Zgłoś jeśli
naruszono regulamin