Built-in functions TODAY and DATEFORMAT(Date & Time) are not working anymore with Jaspersoft Studio 6.0.0

0

In Jaspersoft Studio 5.6.1, I had been using the Built-in function TODAY and DATEFORMAT (Date & Time) in an expression:

DATEFORMAT(TODAY(),"MMMM yyyy")

In Jaspersoft Studio 6.0.0, this is not working anymore. When opening the Preview, I get the following error message:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. net.sf.jasperreports.functions.standard.DateTimeFunctions cannot be resolved to a type
        return getFunctionSupport(net.sf.jasperreports.functions.standard.DateTimeFunctions.class).TODAY();
                                  <------------------------------------------------------->
2. net.sf.jasperreports.functions.standard.DateTimeFunctions cannot be resolved to a type
        return getFunctionSupport(net.sf.jasperreports.functions.standard.DateTimeFunctions.class).DATEFORMAT(arg0, arg1);
                                  <------------------------------------------------------->
2 errors
 
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204)
at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:169)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.compileJasperDesign(ReportControler.java:395)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$14(ReportControler.java:383)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:314)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
georg.schmid's picture
Joined: Nov 10 2014 - 5:55am
Last seen: 4 weeks 10 hours ago

2 Answers:

0

Someone posted this today - they deleted their projects in Studio and then restarted it and started working fine...can u try this? Seems like an upgrade issue

ernestoo's picture
8704
Joined: Nov 29 2010 - 11:59am
Last seen: 2 years 1 week ago
0

Somehow, it worked for me after creating a new project and restarting the studio...

Thanks you very much for your help!

georg.schmid's picture
Joined: Nov 10 2014 - 5:55am
Last seen: 4 weeks 10 hours ago

It just also worked by just restarting the Studio, without even creating a new project.
It only did not work after the first use of the function in an expression.

georg.schmid - 4 years 7 months ago
Feedback