Hi Guys,
I've spend a whole day now to try and add custom userfunctions to my project, but I don't succeed in any way. It should not be that hard: I've followed the steps desribed in the URL here below:
When I follow the steps with the community edition it does not work. The custom functions (like HELLO_WORLD) don't show up in the expression editor and throw an exception when trying to preview.. Exception can be found at the end of this message.
After a dozen attemps on different ways (through scriplest; they don't open) and mostly on the officiel way. I tried to use the pro edition which was on my laptop from 2 monts ago and it worked at once. After that I tried some more things:
* Create a new workspace with community
* Uninstall pro edition
* Reinstall (uninstall and install) community edition
But they all don't work and I'm stuck here with no way to use custom functions.
I love to hear from you guys. Have a great day and thanks in advance!
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :
Source text : HELLO_WORLD_MSG( )
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:467)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:442)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:334)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :
Source text : HELLO_WORLD_MSG( )
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:263)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:611)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:579)
at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:1016)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:504)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:488)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:456)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2067)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:788)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:298)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:152)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:963)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: Function HELLO_WORLD_MSG not found
at net.sf.jasperreports.compilers.GroovyEvaluator.functionCall(GroovyEvaluator.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at SampleFunctions_1416835410257_590303.methodMissing(calculator_SampleFunctions_1416835410257_590303:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:832)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1123)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1076)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
at SampleFunctions_1416835410257_590303.evaluate(calculator_SampleFunctions_1416835410257_590303:160)
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:250)
... 14 more
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now