jkeri Posted November 15, 2018 Share Posted November 15, 2018 My report has two parameters, $P{STARTDATE} and $P{ENDDATE}. I need the dates to default to 01/01 of current year for $P{STARTDATE} and 12/31 of current year for $P{ENDDATE} Both are java.sql.Date class. What is the coding fof the DEFAULT VALUE EXPRESSION? Link to comment Share on other sites More sharing options...
robsil Posted November 15, 2018 Share Posted November 15, 2018 java.sql.Date.valueOf(Calendar.getInstance().get(Calendar.YEAR) + "-01-01") and java.sql.Date.valueOf(Calendar.getInstance().get(Calendar.YEAR) + "-12-31") Link to comment Share on other sites More sharing options...
robsil Posted November 15, 2018 Share Posted November 15, 2018 Set default value expression to be: java.sql.Date.valueOf(Calendar.getInstance().get(Calendar.YEAR) + "-01-01")and java.sql.Date.valueOf(Calendar.getInstance().get(Calendar.YEAR) + "-12-31") 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