Version 7.4 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.
JSON transformers
JSON object. They can be employed to add, remove, and modify fields.A JSON transformer, built with JavaScript, utilizes the entire data JSON object, allowing for manipulation to achieve any required structure. This involves:
- Adding or removing fields
- Modifying fields
- Performing complex calculations
These transformations only impact the JSON file sent and do not affect the rendered report PDF file.
Add a JSON transformer
To add a transformer, click the Add Transformer button, opening a form. Provide a name for the transformer and click Create. The transformer will then appear in the list.
Configure a JSON transformer
To open the configuring page of a transformer, click the configuration button:
Put your executable script in the corresponding field.
JSON-Transformer example
The provided JavaScript code below demonstrates the mutation of the JSON file, adding a reportID field with the value of id:
JSON before the script
JSON after the script