SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 182 | Next

John Ward

"Practical Data Analysis and Reporting with BIRT"


Scripting and Event Handling
[ 242 ]
Well, to understand what that means, we need to look at how BIRT reports are
generated. BIRT Reports are generated in phases, as explained in the BIRT Report
Object Model Scripting Specification at http://www.eclipse.org/birt/phoenix/
ref/ROM_Scripting_SPEC.pdf. There are 5 phases in the report generation life cycle:
Startup
Data Transform
Factory
Presentation
Shutdown
Let's take two of these phases and look at them graphically:
Generation Phase Presentation Phase
BIRT Events
Report Level
Initialize
beforeFactory
afterFactory
Report Element
onPrepare
onCreate
Report Level
Initialize
beforeRender
afterRender
Report Element
onRender
Data Source/Set
beforeOpen
afterOpen
onFetch
beforeClose
afterClose
In each of these Phases, particular events are triggered so that the report developer
can override the default behavior of the report generation. This allows us to do all
sorts of advanced things with BIRT, such as custom filtering of Data, dynamically
adding or removing BIRT objects in the report, or even building an entire BIRT
report through Script. So, in the Generation Phase, at the report Level (globally for
the entire report) we have a few sample events in the previous figure??”Initialize,
beforeFactory, and afterFactory. If we look at the Data Set element, we have five
different events associated with it:
beforeOpen??”executed before opening the Data Set for processing
beforeClose??”executed before closing the Data Set
onFetch??”executed each time a row is retrieved from a Data Set
afterOpen??”executed after the Data Set is open
afterClose??”executed after the Data Set is closed
??? ??? ??? ??? ??? ??? ??? ??? ??? ???
Chapter 10
[ 243 ]
These Events are called in a particular order.


Pages:
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6