I'm trying to utilize some simple groovy methods in my velocity template so that I can perform those simple computations without having to rewrite it multiple times in velocity. I'm having a hard time with figuring out what I'm doing wrong.
In my velocity template I used the information described here to write something very simple such as the following:
#import ('groovy', 'com.nomagic.reportwizard.tools.script.GroovyTool')
\\\$groovy.execute(“test.groovy”)
\\\$groovy.eval("printSomething()")
I have a test.groovy file located in the same location as my template with the following code:
String printSomething()
{
return "Hello World!";
}
I get the following error when I try to run the template:
No signature of method: Script1.printSomething() is applicable for argument types: () values: [] |
Any help would be appreciated.
