Jump to content
We've recently updated our Privacy Statement, available here ×

Date function compile problem


avinash.eng18

Recommended Posts

 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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...