Jump to content
Changes to the Jaspersoft community edition download ×

How to add default date for input parameter?


daad.madhusudan

Recommended Posts

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. 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...