Jump to content
Changes to the Jaspersoft community edition download ×

ethank
Go to solution Solved by marianol,

Recommended Posts

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

withErrors.JPG.1a2f641e2ba9a21fc3580dfd988365d7.JPG

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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

  • Solution

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)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...