Jasper Reports: how to add own Functions to Expression Editor

I am using Jaspersoft Studio 6.6 and try to add own functions to the Expression Editor.

Therefore i follow the tutorial Jaspersoft Studio Expression Editor: how to extend it and contribute your own functions (part 2) - updated for version 5.5 (i was not able to find a more current version so i guess this one should be still correct)

All works fine but i had to replace the language of the generated report (SampleFunctionsReport.jrxml) from groovy to java to get rid of class not found exceptions

Finally the following Errors are remaining:

Description Resource Path Location Type
The method HELLO_WORLD_MSG() is undefined for the type SampleFunctions_1541665022158_603382 SampleFunctionsReport.jrxml /MyFunctions line 37 JRXML Problem
The method HELLO_WORLD_MSG() is undefined for the type SampleFunctions_1541665022158_603382 value = HELLO_WORLD_MSG( ); SampleFunctionsReport.jrxml /MyFunctions line 0 JRXML Problem
The method REPEAT_MSG(String, int, boolean) is undefined for the type SampleFunctions_1541665022158_603382 SampleFunctionsReport.jrxml /MyFunctions line 52 JRXML Problem
The method REPEAT_MSG(String, int, boolean) is undefined for the type SampleFunctions_1541665022158_603382 value = REPEAT_MSG("A message that will be probably repeated",5,true); SampleFunctionsReport.jrxml /MyFunctions line 0 JRXML Problem

I checked the points of the tutorial a couple of times... can someone reproduce my problem? What am i missing?

1 Answer

<import value="test.customfunctions.*"/>

this is the code from my jrxml, which is fine. when i tried to enter the full class name - i got an error, that the package cannot be added.

today i tried the same again - and its working. even the resulting XML is identical!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like