In the Advanced Script dialog box, on the Pascal Script File tab, there is a Check Code button. This checks for simple syntax errors, but it can't detect complex errors. When you run the report, if there's an error, a dialog box displays with as much information as possible.

This tells you what to fix in the code. In the example above, the program tells you it expected to read a semicolon (;) on line 38, character 10.

Common Problems

The following are a few things you need to be aware of in scripting:

  • The program can crash more when you write scripts. There are less protections, so the report is more likely to do something that freezes the program. PDS recommends using newer operating systems. For more information, see System Requirements.
  • It's easy to make a mistake when you enter an event name. The program doesn't tell you when an event name is misspelled or incorrect. If you have this problem, put a ShowMessage command in the procedure when you first add the event to make sure everything you think is running is actually running.
  • If you don't initialize your variables, you will have problems when writing scripts.