avinash.eng18 Posted July 19, 2017 Share Posted July 19, 2017 have a report (javabean collection datasource) which uses a date function - DATEFORMAT($F{meetingDate},"EEEE dd MMMM yyyy"). The report runs fine in eclipse and if I remove the function it runs properly through java. With the function I get the following errors though net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The method DATEFORMAT(Date, String) is undefined for the type ****** value = DATEFORMAT(((java.util.Date)field_OBSDate.getValue()),"EEEE dd MMMM yyyy"); //$JR_EXPR_ID=10$ <--------> 2. The method DATEFORMAT(Date, String) is undefined for the type ******* value = DATEFORMAT(((java.util.Date)field_OBSDate.getOldValue()),"EEEE dd MMMM yyyy"); //$JR_EXPR_ID=10$ <--------> 3. The method DATEFORMAT(Date, String) is undefined for the type ******* value = DATEFORMAT(((java.util.Date)field_OBSDate.getValue()),"EEEE dd MMMM yyyy"); //$JR_EXPR_ID=10$ <--------> 3 errors My required date formatt is MM-DD-YYYY HH:mm:SS Link to comment Share on other sites More sharing options...
darth_fader Posted July 19, 2017 Share Posted July 19, 2017 You'll need to include the jasperreports-functions jar in your project, put it on your class path etc. to be able to use dateformatJar file available here:http://community.jaspersoft.com/project/jasperreports-library/releases Link to comment Share on other sites More sharing options...
avinash.eng18 Posted July 20, 2017 Author Share Posted July 20, 2017 i have made the suggested change but still not able to achieve the result.. any help.. it still throws the same error. 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