Default java.sql.timestamp parameter expression works in iReport but not on JasperServer

I'm new to JasperReports so hopefully this is a simple question.  I've already spent a number of hours trying to figure it out, though.

I have a query in a report that has a java.sql.timestamp type parameter with an input control.  A default expression of java.sql.Timestamp() is specified. 

The default expression is properly reflected when I run the report in iReport, even when choosing the 'Run JasperServer Report' option.  However if I try to run the JasperServer report from a browser the default values appear as 1969-12-31, which I assume is a value of 0 for a timestamp.  Although the defaults don't show up, I can still set the input control values via the browser and report runs fine.

I've run across some old threads regarding the java.sql.Timestamp / java.util.Date issues, e.g., this one from 2008:

How to use java.sql.Timestamp on JasperServer,

I haven't been able to get the workaround in that thread to work (default shows up blank in datetime control) and I haven't been able to find any information about how the newer versions of JasperServer are supposed to support java.sql.Timestamp types directly.  Does that support extend to input controls?  I can't figure out how to create an input control (or datatype) on the server repository of type Timestamp.

Any help appreciated.  -- Herb

hes43's picture
Joined: Mar 27 2012 - 12:42pm
Last seen: 11 years 6 months ago

0 Answers:

No answers yet