zbigniew.nitecki Posted May 6, 2019 Share Posted May 6, 2019 Hi,I have an JRXML file (not compiled) in my Java classpath.It worked perfectly, but I had to make some changes in the code, and I started using internal Jasper methods:DAY(Date)DAYSINMONTH(Date)MONTH(Date)[/code]When I am testing it in the Jasper Designer, everything is fine. But in the java app, when I am trying to compile the report and generate the PDF file I get errors:1. The method DAY(Date) is undefined for the type invoice_sub_1557138584226_714026 value = String.format("%2s", DAY(((java.util.Date)parameter_ORDER_DATE.getValue()))).replace(" ", "0") + //$JR_EXPR_ID=9$ <->2. The method MONTH(Date) is undefined for the type invoice_sub_1557138584226_714026 String.format("%2s", MONTH(((java.util.Date)parameter_ORDER_DATE.getValue()))).replace(" ", "0") + //$JR_EXPR_ID=9$ <--->3. The method DAYSINMONTH(Date) is undefined for the type invoice_sub_1557138584226_714026 String.format("%2s", DAYSINMONTH(((java.util.Date)parameter_ORDER_DATE.getValue()))).replace(" ", "0") + //$JR_EXPR_ID=9$ <--------->[/code] What have I done wrong? Link to comment Share on other sites More sharing options...
hozawa Posted May 8, 2019 Share Posted May 8, 2019 Maybe missing jasperreports-functions-xxx.jar in the class path?https://sourceforge.net/projects/jasperreports/files/jasperreports/JasperReports%206.8.0/jasperreports-functions-6.8.0.jar/download Link to comment Share on other sites More sharing options...
Recommended Posts
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