johnwmcc Posted August 13, 2009 Share Posted August 13, 2009 I have a simple and I'm sure a common requirement, but can't see how to implement it.I have a report where I want to prompt for a parameter for the Start date for items to include.I have successfully set up such a Parameter, type java.util.date, and also successfully modified the report query to use it to limit the report to items after that date.Unfortunately, the parameter I input is always interpreted as if it were a US date (mm/dd/yyyy) - so if I input 1/9/2007 I get results from 9 Jan 2007, NOT 1 September 2007. I and my users will need UK dates.I have searched the forum for permutations of Date, Parameter, UK, Format, and Input, and found very few even nearly relevant posts.There were a couple that came close to my question, but I didn't understand the complex answers, and I can't (yet, anyway) believe that the answer has to be that complex!I'm very new both to Java and to iReport - I've only used iReport for three days, and Java for even less than that. I have done a lot of programming over many years, but not in Java, only in PHP, Javascript, and Microsoft VBA for Access and Excel and years ago in Fortran.My Windows Vista machine is set to UK locale. I've looked in all the iReport Tools/Options for a date format option, and can't see one.I have changed the format of a Date FIELD with the appropriate Pattern, but there isn't such an option for a Date PARAMETER.This must be a common requirement in the UK, but I can't find how to solve it!Help would be much welcomed - I've spent nearly two hours hunting this forum, and the wider internet, without success.Thanks if you can helpJohn McC Link to comment Share on other sites More sharing options...
baggypants Posted August 14, 2009 Share Posted August 14, 2009 I think your absolutly right! It's never been a big issue for me though as my users access the report through jasperserver which takes the date input format from windows. Pop a feature request in the tracker though and it'll get my vote. Link to comment Share on other sites More sharing options...
C-Box Posted August 14, 2009 Share Posted August 14, 2009 I already made a BugReport this week... see here Hope that this will be fixed in 3.5.4 C-Box Link to comment Share on other sites More sharing options...
johnwmcc Posted August 14, 2009 Author Share Posted August 14, 2009 In some ways, it's even worse than I had thought. If I put in the date of 14/08/2007 (UK dd/mm/yyy date of 14 August 2007) instead of rejecting it as an invalid (US mm/dd/yyyy) date, it returns values from 08 Feb 2008 - month 14 in year 2007, anyone? Logical, in a weird way, but not actually helpful.I'll try to put this in as a bug report, but I'm not yet sure how to.John McC Link to comment Share on other sites More sharing options...
baggypants Posted August 14, 2009 Share Posted August 14, 2009 Click on Tracker link above then on Report Issue Link to comment Share on other sites More sharing options...
johnwmcc Posted August 14, 2009 Author Share Posted August 14, 2009 I've now put in a Bug Report about this. John McC 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