Changeset View
Changeset View
Standalone View
Standalone View
KReportScript.dox
1 | /** | 1 | /** | ||
---|---|---|---|---|---|
2 | * \mainpage | 2 | * \mainpage | ||
3 | * | 3 | * | ||
4 | * KoReport is a library for the generation of reports in multiple formats. | 4 | * KReport is a library for the generation of reports in multiple formats. | ||
5 | * | ||||
6 | * It contains support for user generated scripts written in Javascript. | ||||
staniek: This is OK change | |||||
7 | * This document describes the user facing API for controling reports. | ||||
5 | * | 8 | * | ||
6 | * Concepts | 9 | * Concepts | ||
7 | * ======== | 10 | * ======== | ||
8 | * | 11 | * | ||
9 | * KoReport user scripting has the following concepts: | 12 | * KReport user scripting has the following concepts: | ||
10 | * * The top-level report object \n | 13 | * * The top-level report object \n | ||
11 | * This contains functions for retreiving the report name, section objects and item objects \n | 14 | * This contains functions for retreiving the report name, section objects and item objects \n | ||
12 | * It also contains event handlers which are executed at open, complete, and newPage events \n | 15 | * It also contains event handlers which are executed at open, complete, and newPage events \n | ||
13 | * | 16 | * | ||
14 | * * Section objects \n | 17 | * * Section objects \n | ||
15 | * Sections contain function for receiving the section name, setting the background colour,\n | 18 | * Sections contain function for receiving the section name, setting the background colour,\n | ||
16 | * and retreiving items within the section.\n | 19 | * and retreiving items within the section.\n | ||
17 | * It also contains event handlers which are executed when the section is rendered\n | 20 | * It also contains event handlers which are executed when the section is rendered\n | ||
Show All 16 Lines | |||||
34 | * To add basic scripting to a report, it is nescessary to perform the following steps: | 37 | * To add basic scripting to a report, it is nescessary to perform the following steps: | ||
35 | * * Create a script object | 38 | * * Create a script object | ||
36 | * * Within the object implement handlers for one or more events | 39 | * * Within the object implement handlers for one or more events | ||
37 | * * Assign the script objet to the appropriate report object so that it an be executed | 40 | * * Assign the script objet to the appropriate report object so that it an be executed | ||
38 | * | 41 | * | ||
39 | * Example | 42 | * Example | ||
40 | * ======= | 43 | * ======= | ||
41 | * | 44 | * | ||
42 | * The following javascripy snippet contains a basic object with no methods | 45 | * The following javascript snippet contains a basic object with no methods | ||
43 | * | 46 | * | ||
44 | * \code | 47 | * \code | ||
45 | * function detail() | 48 | * function detail() | ||
46 | * { | 49 | * { | ||
47 | * } | 50 | * } | ||
48 | * \endcode | 51 | * \endcode | ||
49 | * | 52 | * | ||
50 | * We then add a handler for the OnRender() event with a single method | 53 | * We then add a handler for the OnRender() event with a single method | ||
Show All 29 Lines |
This is OK change