Hi Jasper fans,
on my jasperserver, i have a report with two timestamp parameters (StartDate, EndDate). If i want to pass the date via the restv2 interface, i receive the following error:
<errorCode>input.controls.validation.error</errorCode> <message>Input controls validation failure</message>
Specify a valid value for type Timestamp.
The value of the timestamp parameter is just a typically sql.timestamp like: 2018-06-01 19:52:34.266
My GET-Request is like: HOST:8080/jasperserver/rest_v2/reports/myReport.pdf?StartDate=2018-06-01 19:52:34.266
I don´t know why the server rest interface throws a validation error. Does anyone have a suggestion or idea to solve this problem? Thank you very much.
Kind Regards Florian
Check the web services guide, it looks like it needs a timezone too.
"Both date-only and timestamp fields are given in the ISO date-time format such as 1997-01- 01T04:05:06+02:00. For database columns that store a time and date that includes a time zone, such as “timestamp with time zone” in PostgreSQL, the result is not guaranteed to be in the same timezone as stored in the database. These dates and times are converted to the server’s time zone."
when I follow your advice, i dont get this error. Great.
But, i did the following. I have a report with two Parameter-Dates: StartDate and EndDate (java.util.Date in the jasper studio)
When I call the jasper server with: StartDate=1997-01-01T04:05:06+02:00 , the report will display: StartDate : 1997-01-01 00:00:00. So the time information is lost.
If i set the ParameterType to java.sql.Timestamp, it works....but i have to use the java.util.date on the report-side.
Many thanks and kind regards