Table of Contents
Report Editor - Script Editor
The Script Editor is a part of the Report Editor. You can create and edit scripts for events fired during the report generation process.
Script Editor supports the following scripts:
The Script Editor has an easy layout for script writing:
It consists of the next main parts:
- Toolbar
- Controls Tree
- Script Area
- Logs
Script Editor Toolbar
Scripts mode toolbar has following two tabs: Scripts and Options
- Preview - switch to preview mode
- Editor - switch to layout editor mode
- Execute - execute the current script
- Preview - switch to preview mode
- Editor - switch to layout editor mode
- Reuse report instance - if TRUE, the same report instance object will be used to execute script on each Execute button click
Script Editor Controls
Represents all objects of report in a tree view. You can select objects to view and edit their scripts.
Script Area
The script area has following three parts:
- Script kinds tab bar - contains tabs for all possible script kinds of currently selected object in tree. NOTE: Tabs with scripts are marked with a special icon
- Language drop-down list - defines the language of the script: SQL or JavaScript.
- Script text field - allows editing text of the script with autocompletion for the chosen language.
Report events:
- pre_build - executed before building the report. NOTE: This is the right place for initialisation steps
- post_build - executed after building the report
- pre_add_page - executed before adding a page to the report
- post_add_page - executed after adding a page to the report
- pre_print - executed before printing the report
- post_print - executed after printing the report
Control events:
- pre_place - executed before placing a control on the page
- post_place - executed after placing a control on the page