lisa.j.young Posted May 8, 2017 Share Posted May 8, 2017 I have created a report which accepts a java.util.Date as a parameterIn JasperStudio the Date and Time is requested however on JasperServer only the Date is requested and as such the end date is searching until 00:00:00 instead of 23:59:59I can change the input control on JasperServer to use DateTime, however when I update the report through JasperStudio it overwrites the changes on the Server and goes back to requesting only a Date.How can I specify in JasperStudio that the parameter should be Date/Time ?Note: My column in Mysql is of type DateTime, not TimestampExcerpt from my jrxml:<parameter name="startDate" class="java.util.Date"/><parameter name="endDate" class="java.util.Date"/><queryString language="SQL"><![CDATA[sELECT someinfoFROM paymentsINNER JOIN paymenttype ON payments.payment_type=paymenttype.id WHERE timestamp BETWEEN $P{startDate} and $P{endDate} AND payments.status=1GROUP BY payments.payment_type, YEAR(payments.`timestamp`), MONTH(payments.`timestamp`)ORDER BY YEAR(payments.`timestamp`) DESC, MONTH(payments.`timestamp`) DESC]]></queryString> Link to comment Share on other sites More sharing options...
brian.berrelez Posted October 24, 2017 Share Posted October 24, 2017 Were you able to find a solution for this? I am also need to pass in date and time and I have been unable to do so. Link to comment Share on other sites More sharing options...
chris.dirubio Posted December 4, 2019 Share Posted December 4, 2019 I've managed to pass the time part through the java.sql.Timestamp type parameter Link to comment Share on other sites More sharing options...
Friendly User Posted December 4, 2019 Share Posted December 4, 2019 Hello,please try to use java.sql.Timestamp type for the parameter that is associated with the input control. java.util.Date strips the time part when the value comes from a JasperServer input control Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now