Beruflich Dokumente
Kultur Dokumente
Events
# Introduction
# Two Types of Events
# Register An Event
# List of Events
# OnBeforeServicesInit
# OnServicesInit
# OnInit
# OnBeforeSetup
# OnSetup
# OnInitDone
# OnBeforeRun
# OnRunEnd
# OnBeforeRender
# OnRenderEnd
# OnBeforeResourceAttached
# OnResourceAttached
# OnResourceInit
# OnBeforeWidgetInit
# OnWidgetInit
# OnBeforeWidgetRender
# OnWidgetRender
Introduction #
During report life cycle, report will emit certain events. This is extremely useful for debugging, service add-on functioning and event
processing.
1. Before: Emit right before something happens and has capability to prevent that thing to happen.
2. After: Emit right after something happens.
The events which emit before something happens normally has form of "OnBefore{SomethingHappens}" in their names.
Those events which emit after something happens normally has form of "On{SomethingHappens}" in their names.
Register An Event #
Bellow are common form to register events in KoolReport
https://www.koolreport.com/docs/architecture/events/#introduction 1/4
12/11/2019 Events Of Report - KoolReport Documentation
}
}
List of Events #
OnBeforeServicesInit #
Emitted before KoolReport's services are initiated. Return true to approve action, return false to disapprove action.
OnServicesInit #
Emitted after KoolReport's services are initiated.
OnInit #
Emitted after KoolReport is init, services are added but have not setup data processing.
OnBeforeSetup #
Emitted before setting up the data process tree. Return true to approve action, return false to disapprove action.
OnSetup #
Emitted after data processing tree is setup
https://www.koolreport.com/docs/architecture/events/#introduction 2/4
12/11/2019 Events Of Report - KoolReport Documentation
OnInitDone #
Emitted after the initiation phase is completed
OnBeforeRun #
Emitted before report is run. Return true to approve action, return false to disapprove action.
OnRunEnd #
Emitted after report is run
OnBeforeRender #
Emitted before report is rendered. Return true to approve action, return false to disapprove action.
OnRenderEnd #
OnBeforeResourceAttached #
Emitted before resource manager attaches resources to report's view. Return true to approve action, return false to disapprove action.
OnResourceAttached #
Emitted after resource manager attaches resources to report's view.
https://www.koolreport.com/docs/architecture/events/#introduction 3/4
12/11/2019 Events Of Report - KoolReport Documentation
OnResourceInit #
Emitted after resource manager is initiated.
OnBeforeWidgetInit #
Emitted before any widget is initiated. Return true to approve action, return false to disapprove action.
OnWidgetInit #
Emitted after widget is initiated
OnBeforeWidgetRender #
Emitted before any widget is rendered. Return true to approve action, return false to disapprove action.
OnWidgetRender #
Emitted after widget rendered
https://www.koolreport.com/docs/architecture/events/#introduction 4/4