Jasper Report doesn't run from Servoy? Version mismatch?

I have a report that runs from Jasper (iReport 2.0.3) but it doesn’t run from Servoy. I get an error on the following line:

java.lang.Exception: Error evaluating expression : 
	Source text : 
$P{REPORT_FORMAT_FACTORY}.createDateFormat("HH:mm", $P{REPORT_LOCALE}, $P{REPORT_TIME_ZONE})

I noticed that in the JasperPlugin docs that the $P{REPORT_FORMAT_FACTORY} is not mentioned.

Perhaps this is a new built-in parameter in Jasper.
Maybe the Jasper Plugin needs to be updated?

Does this situation is familiar to someone?

The reason I use this construction, is the following:

I my database I have a field of type DATETIME. I wanted to show the HH:mm (for example 07:00) in my report, but I didn’t find a simple method, like $F{myDate}.format(“HH:mm”) and after searching the internet I found the following construction which seem to work in Jasper:

$V{HHMMformat} = $P{REPORT_FORMAT_FACTORY}.createDateFormat("HH:mm", $P{REPORT_LOCALE}, $P{REPORT_TIME_ZONE})
$V{showTime} = $V{HHMMformat}.format($F{MyDate})

In case someone has a better solution for that, please let me know so that I don’t have to use this $P{REPORT_FORMAT_FACTORY}.

Thanks

Martin

Hi Martin,

It can be that the feature you are using is something introduced in a later version of Jasper Reports then the version you have installed to work with Servoy.

You can download the latest and greatest version of the Jasper Reports engine from JasperReports Library download | SourceForge.net

Specifically, the jasperreports-2.0.4.jar at the following url JasperReports Library - Browse /archive/jasperreports at SourceForge.net
Note: this url points to the lastest release at this moment. In the future, find the latest release through the previous mentioned url.

Place this new jar into the …/plugins/jasperPluginRMI directory, remove the old jasperreports.jar file, update the …/plugins/jasperPluginRMI.jar.jnlp file to point to the new jar instead of the old and then you should be good to go,

Paul

Hi Paul,

Thanks for your reply.
I had installed iReports on my client computer, but I didn’t know that I had to update the plugin-directory.

Now JR works again.

Thanks

Martin

iReports runs it’s own instance of Jasper Reports and Servoy as well.

So, when using new features of Jasper Reports, you might have to update the JR engine used by Servoy as well.

Paul