This recipe demonstrates how to import class into a report template using JavaScript.
Steps taken:
- Create a blank report template (ImportClass.rml).
- Place the Test.jar file into the /Repertoire/ext/ folder.
- Enter the following script into the “Function Definitions” tab:importClass(Packages.test.Test);
testCons = new Test(); - Enter the following script into the blank area of “Section Footer”:"’" + testCons.retStr() + “’ is value retrieved from the function.”
To download the necessary files for this recipe, refer to the attached ZIP file.
ImportClass.zip (3.3 KB)