ethank Posted November 7, 2012 Share Posted November 7, 2012 Hello, I am having trouble with Date input controls. In my report I have created two parameters with the type java.util.Date. I have created two matching input controls with the type Date also, but when I run the report on the server I get the error "Specify a valid value for type Date." after selecting a date from the calendar date picker. What happens is the format YYYY-MM-DD is correct for java.util.Date(), but when a date is selected it changes to MM/DD/YYYY which is not recongized as Date I suppose. I have tried changing the jasperserver_config.properties to match the correct formating. I have also tried the workaround specified in http://community.jaspersoft.com/wiki/calendar-picker-stuck-mmddyyyy-v47#Example:. Regards, EthanHere is a screen shot --------------------------> Link to comment Share on other sites More sharing options...
mgeise Posted November 8, 2012 Share Posted November 8, 2012 How did you set up the Input Control - through iReport or within the Server UI? Did you set up a format on the datatype that you associated with the Input control? What Locale are you logged in with? What version are you on of the server? Link to comment Share on other sites More sharing options...
ethank Posted November 8, 2012 Author Share Posted November 8, 2012 I setup the Input Controls through IReports originally, but I also have created them through the Server UI which gives me the same results. _________________________________________________________________________________________________________________ I set the type for the datatype as "Date" which is associated with the input control. I have tried putting "YYYY-MM-DD" in the pattern field but nothing changed. I haven't seen any fields named "format" though, where would I change that? _________________________________________________________________________________________________________________ I am logging as admin, I assume the locale is en-US, how do you check? _________________________________________________________________________________________________________________ The server version is 4.7. _________________________________________________________________________________________________________________ For now I have changed the datatype to "text" for the input controls, and it works fine if I just type the date using the format "YYYY-MM-DD", keeping the parameters in the report the same as before(type "Date"). The problem with this workaround is that the calendar picker goes away. _________________________________________________________________________________________________________________ Thanks Link to comment Share on other sites More sharing options...
Solution marianol Posted November 8, 2012 Solution Share Posted November 8, 2012 I'm pretty sure is a Locale issue. That was a bug in 4.7.0 I think is fixed in 4.7.1If you already applied the workaround from: http://community.jaspersoft.com/wiki/calendar-picker-stuck-mmddyyyy-v47Edit the applicationContext-security.xml (inside the WEB_INF folder) and around line 140 you will see the Locale definitions, change the English one (the first) to <value type="java.util.Locale">en_US</value> (see more infor on the available Locales here http://www.scribd.com/doc/47522603/113/Specifying-Additional-Locales) Link to comment Share on other sites More sharing options...
ethank Posted November 12, 2012 Author Share Posted November 12, 2012 Thank you so much. That fixed the problem. 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