Use Scripts in Reports

Scripting is available in on-premises installations of Geocortex Reporting only. Scripting is not available in cloud Reporting.

In on-premises installations of Geocortex Reporting, you can include C# scripts in your reports. A script is a custom event handler that is associated with a particular control.

Scripting is enabled by default in on-premises Reporting. You can disable scripting if you want.

To use scripts in reports, you must be familiar with C#.

Scripting allows report authors to write code that executes on your server. This can represent a security vulnerability if your report authors are not trusted.

To add a script to a report:

  1. Open the report in Report Designer.

  2. Select the control that you want the script to act on.

  3. Click Scripts and select the desired event from the drop-down list.

    Alternatively, select the control in the Properties panel, expand Behavior | Scripts, and click the icon beside the desired event.

    The script editor opens. The editor contains a script stub for the selected event.

    You can insert additional stubs for other events in the same manner.

  4. Type in the script. The script editor provides intelligent code completion.

    You can click Validate at any time to validate the script.

  5. When the script is valid, click Designer to return to the design surface.

  6. To test your script, preview the report.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.2