In the next
chapter, we are going to expand on the concept of scripting.
Scripting and Event Handling
We have come a long way since we started this book. We have seen all the different
aspects of the BIRT Report Development environment. We have seen how to "drag and
drop" reports with the Palette and the Report Designer, how to work with the Outline
and the Navigator, and how to set properties for each of the report components.
Now, we are going to look at the aspect of BIRT that make it really powerful,
Scripting. Scripting is a complex topic, but once you understand it, you will be able
to make BIRT do some really amazing things. It is possible to modify data as it comes
through, using Scripting. It is possible to build Data Sources of Java objects with
Scripting. And it is even possible to build reports from the ground up using Scripting.
BIRT utilizes the Mozilla Rhino Engine to handle its Scripting capabilities. What
this means is that inside of BIRT reports, Report Designers have full access to all
primitive types, objects, methods, and Libraries accessible to JavaScript. As an added
bonus, Report Developers even have full access to all Java classes that are in the
Classpath. In the BIRT Report Designer, this means you have full access to all the
Java objects in the Eclipse environment.
Pages:
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186