A script is a program written in a high-level language that becomes part of a report. When the report runs, the script runs as well. A script can handle data in ways that are not possible using the normal operations of the DMS Reports core. For example, a script can be used to display calculated information, change an object's properties based on a condition, etc.
A script is written in one of the languages supported by the script engine. Currently, these are:
Note that the help documentation and tutorials are not intended to teach you any of the above script languages. In order to write a script, a background in programming is highly recommended and a knowledge of Pascal, C++, BASIC or Java is an asset.
Warning: Do not change a report's script language after you have written a script. Changing the scrip language will delete any existing scripts because the DMS Report Designer has to prepare for the new language format.
The following features are supported by the script engine:
The script engine however does not support the declarations of records or classes, pointers, sets (but the 'IN' operator can be used in expressions such as "a in ['a'..'c','d']"), shortstring type, and unconditional jumps (GOTO).
Scripts are created in the Report Designer using the script editor found on the Code tab. There is also an embedded debugger which has the functions Step, Breakpoint, Run to cursor and Evaluate.
The correct syntax of the scripts is a strong rule!
An example of the script window is below:
Legend:
To try writing your first script, see the Report Scripts using Jobs Tutorial.
For more detailed information on the script engine, the following topics are covered:
DMS uses the FastScript engine. A detailed description of the FastScript engine can be found in the FastScript Documentation in PDF format.