shiv_4 Posted September 27, 2018 Share Posted September 27, 2018 I have a report that has two parameters, Start Date and End Date. I need to set default values for Start Date to be the first day of the year and end date to be today's date. How can I set these values ? There are user expressions but how can I specify custom expression ? Link to comment Share on other sites More sharing options...
Solution reportdev Posted September 27, 2018 Solution Share Posted September 27, 2018 Here you go:<parameter name="startDate" class="java.util.Date"> <defaultValueExpression><![CDATA[DATE(YEAR(new Date()),01,01)]]></defaultValueExpression> </parameter> <parameter name="endDate" class="java.util.Date"> <defaultValueExpression><![CDATA[new Date()]]></defaultValueExpression> </parameter> startDate Expression: DATE(YEAR(new Date()),01,01)endDate Expression: new Date() 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