Report Scripting
Applies to: Kyvos Reporting
Kyvos Reporting Studio allows customization of report behavior through JavaScript-based scripting using the Script Editor. Scripts are associated with specific events triggered during report execution or rendering. Event handling enables dynamic layout, data manipulation, and error control.
Important
Always place event-specific logic within the correct event handler to ensure accurate execution.
Report-Level Events
The following events are available at the report level:
Event | Description |
|---|---|
| Triggered before report components (fields, sections) are constructed. Use this to initialize global variables or control report execution flow. |
| Triggered after the report execution is completed. Useful for cleanup or summary actions. |
| Fired before rendering each page. Does not guarantee previous page display is complete. |
| Fired after rendering each page. |
| Triggered when a user clicks a hyperlink in the report output. Receives parameters such as mouse button and URL. |
| Triggered after the report is loaded and SQL fields are created. Use this to add/remove fields dynamically before data fetching begins. |
| Fired after each row is fetched from the database. Allows data manipulation and real-time calculations. |
| Triggered when the report query returns zero rows. |
| Fired when the printing process advances to the next page (sending data to printer driver). |
| Triggered when an error occurs during report execution. Allows you to suppress or customize error messages. |
Section-Level Events
Each report section supports the following events. Event execution depends on summary object dependencies and layout structure.
Event | Description |
|---|---|
| Fired after data is loaded into fields but before the section is laid out. Use this to modify control layout, visibility, and section height. |
| Triggered before the section is rendered to the output. Use for setting control values. Avoid accessing report fields directly—use hidden controls if needed. |
| Triggered after the section is rendered. Use this to update counters or flags used in later sections or for logging/report summary. |
Note
OnFormat is the only event where you can change the height of a section at runtime.