1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
/**
* \mainpage
*
* KReport is a library for the generation of reports in multiple formats.
*
* It contains support for user generated scripts written in Javascript.
* This document describes the user facing API for controling reports.
*
* Concepts
* ========
*
* KReport user scripting has the following concepts:
* * The top-level report object \n
* This contains functions for retreiving the report name, section objects and item objects \n
* It also contains event handlers which are executed at open, complete, and newPage events \n
*
* * Section objects \n
* Sections contain function for receiving the section name, setting the background colour,\n
* and retreiving items within the section.\n
* It also contains event handlers which are executed when the section is rendered\n
*
* * Item objects \n
* Items contain functions to manipulate item specific properties prior to drawing them on screen \n
*
* * Generic objects \n
* * debug - contains functions for printing debug messages. See KRScriptDebug.
* * draw - contains functions for drawing basic shapes on the canvas of a report. See KRScriptDraw.
* * constants - contains some userful constant data. See KRScriptConstants.
*
* * In addition to the above, applications can add their own functions to the report engine, Kexi adds:
* * field - contains functions or retreiving field values, and agggregate values.
*
*
* Adding basic scripting to a report
* ==================================
*
* To add basic scripting to a report, it is nescessary to perform the following steps:
* * Create a script object
* * Within the object implement handlers for one or more events
* * Assign the script objet to the appropriate report object so that it an be executed
*
* Example
* =======
*
* The following javascript snippet contains a basic object with no methods
*
* \code
* function detail()
* {
* }
* \endcode
*
* We then add a handler for the OnRender() event with a single method
*
* \code
* function detail()
* {
* this.OnRender = function()
* {
* debug.print("Rendering a detail section");
* }
* }
* \endcode
*
* Finally we assign this script object to the actual report object by calling:
*
* \code
* reportname.section_detail.initialize(new detail())
* \endcode
*
* where reportname is the name of the report
*
* It is possible to assign script objects to report objects this way for any of the report sections,
* and the main report object.
*
* See Scripting::Report and Scripting::Section for a starting point.
*/
// DOXYGEN_SET_PROJECT_NAME = KReport
// DOXYGEN_SET_IGNORE_PREFIX = KReport K
|