[JavaScript] Import Class

This recipe demonstrates how to import class into a report template using JavaScript.

Steps taken:

  1. Create a blank report template (ImportClass.rml).
  2. Place the Test.jar file into the /Repertoire/ext/ folder.
  3. Enter the following script into the “Function Definitions” tab:importClass(Packages.test.Test);
    testCons = new Test();
  4. 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)