JasperServer Date input

0

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, Ethan

Here is a screen shot -------------------------->

ethank's picture
4
Joined: Nov 7 2012 - 9:41am
Last seen: 1 year 8 months ago
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?
mgeise - 1 year 8 months ago
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
ethank - 1 year 8 months ago

1 Answer:

1

I'm pretty sure is a Locale issue. That was a bug in 4.7.0 I think is fixed in 4.7.1

If you already applied the workaround from: http://community.jaspersoft.com/wiki/calendar-picker-stuck-mmddyyyy-v47

Edit 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)

marianol's picture
1672
Joined: Sep 13 2011 - 8:04am
Last seen: 1 week 2 days ago
Thank you so much. That fixed the problem.
ethank - 1 year 8 months ago
Feedback
randomness