Hello, I was able to create custom functions in Jasper Studio, and they work on my computer when I test the reports. But when I published the report to the Jasper server I get an error like this
Errors were encountered when compiling report expressions class file: 1. The method CURRENT_MONTH_BEGINNING() is undefined for the type TotalTaskHrsOnly...
What is the proper way to include the custom functions that I made, so that the report works when making a request to the Jasper server? If anyone can provide me with a tutorial on how to do this, that would be great. Thank you
2 Answers:
Take a look at this question. You need to export your custom function as jar file and uploading the jar file to JasperReports Server.
https://community.jaspersoft.com/questions/1038286/reports-jasper-server...
Using scriplets works well for me.
Take a look at: https://community.jaspersoft.com/blog/all-you-want-know-about-scriptlets
Mariano
The reason why my custom functions were not working was because I did not export the 2 properties files that are generated when creating new library functions.
The steps that I took to add my new functions to the Jasper server are here:
Once the jar file is exported, you will need to log into the Jasper Server, and add the jar file as a resource to the report
Hopefully this helps others who may have had problems adding custom functions to the Jasper Server.