How to add default date for input parameter?

I am working on a jasper report in which I am  using two input dates "START_DATE" and "END_DATE". I want to keep default value for START_DATE as "2013-12-01' and FOR "END_DATE" as current date.

For END_DATE I am able to do it using expression "new Date()". But for START_DATE how can I specify this default value. 


I tried top do it like:

new SimpleDateFormat("yyyy-MM-dd").format((new SimpleDateFormat("yyyy-MM-dd").parse("2013-12-01")))

But its throwing error: Error filling print... java.lang.String cannot be cast to java.util.Dat


Please help me to solve this. 

daad.madhusudan's picture
Joined: Mar 13 2015 - 4:36am
Last seen: 7 years 1 month ago

0 Answers:

No answers yet