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 Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 2. The method DATEFORMAT(Date, String) is undefined for the type Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getOldValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 3. The method DATEFORMAT(Date, String) is undefined for the type Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 3 errors

Stack Overflow | Madhavan.G | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    The jrxml file compilation failed due to built-in missing in ant

    Stack Overflow | 3 years ago | Madhavan.G
    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 Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 2. The method DATEFORMAT(Date, String) is undefined for the type Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getOldValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 3. The method DATEFORMAT(Date, String) is undefined for the type Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 3 errors
  2. 0

    compilation failing in Jasper Reports

    Stack Overflow | 1 year ago | Charan
    net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. Incompatible conditional operand types BigDecimal and String value = (java.lang.String)(((((java.lang.String)field_flightNo.getValue())!=null)?((java.lang.String)field_flightNo.getValue()):" ") + "-" + ((((java.math.BigDecimal)field_legNo.getValue())!=null)?((java.math.BigDecimal)field_legNo.getValue()):" ")); //$JR_EXPR_ID=31$ <---------------------------------------------------------------------------------------------------------> 2. Incompatible conditional operand types BigDecimal and String value = (java.lang.String)(((((java.lang.String)field_flightNo.getOldValue())!=null)?((java.lang.String)field_flightNo.getOldValue()):" ") + "-" + ((((java.math.BigDecimal)field_legNo.getOldValue())!=null)?((java.math.BigDecimal)field_legNo.getOldValue()):" ")); //$JR_EXPR_ID=31$ <---------------------------------------------------------------------------------------------------------------> 3. Incompatible conditional operand types BigDecimal and String value = (java.lang.String)(((((java.lang.String)field_flightNo.getValue())!=null)?((java.lang.String)field_flightNo.getValue()):" ") + "-" + ((((java.math.BigDecimal)field_legNo.getValue())!=null)?((java.math.BigDecimal)field_legNo.getValue()):" ")); //$JR_EXPR_ID=31$ <---------------------------------------------------------------------------------------------------------> 3 errors

    Root Cause Analysis

    1. 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 Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 2. The method DATEFORMAT(Date, String) is undefined for the type Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getOldValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 3. The method DATEFORMAT(Date, String) is undefined for the type Flower_1400575815940_409825 value = DATEFORMAT(new Date(((java.sql.Timestamp)field_TIMESHEETDATE.getValue()).getTime()),"MMMM"); //$JR_EXPR_ID=15$ <--------> 3 errors

      at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport()
    2. JasperReports
      JRAntCompileTask.execute
      1. net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204)
      2. net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:354)
      3. net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:270)
      4. net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:252)
      5. net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompileTask.java:402)
      6. net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompileTask.java:249)
      6 frames
    3. Ant
      UnknownElement.execute
      1. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. Ant
      DefaultExecutor.executeTargets
      1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      2. org.apache.tools.ant.Task.perform(Task.java:348)
      3. org.apache.tools.ant.Target.execute(Target.java:392)
      4. org.apache.tools.ant.Target.performTasks(Target.java:413)
      5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      6. org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      7 frames
    6. org.eclipse.ant
      EclipseDefaultExecutor.executeTargets
      1. org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      1 frame
    7. Ant
      Project.executeTargets
      1. org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      1 frame
    8. org.eclipse.ant
      InternalAntRunner.main
      1. org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
      2. org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
      2 frames