tejeshwar Posted March 25, 2008 Share Posted March 25, 2008 How to declare a default value for a parameter whose parametr class is date need the format for giving the default date value.i have tried different combinations and it seems to like not taking the years above 2000. -Tejeshwar Link to comment Share on other sites More sharing options...
mdahlman Posted April 11, 2008 Share Posted April 11, 2008 Tejeshwar, I'm not a Java programmer either, so I keep a few samples handy for things like this. Try these 2 samples of default date values: new java.util.Date() // gives the current datenew SimpleDateFormat("yyyy-MM-dd").parse("2008-01-01") Regards,Matt Link to comment Share on other sites More sharing options...
alex.chan Posted April 16, 2008 Share Posted April 16, 2008 Tejeshwar If you want to do so in the jrxml, try this: <parameter name="RequestDate" isForPrompting="false" class="java.util.Date"> <defaultValueExpression ><![CDATA[new java.util.Date(97, 5, 1)]]> </defaultValueExpression></parameter> it represents 06-01-1997 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