WEB-INF/classes/relativedate.properties

I changed the week.start.date=2 to 1 but when i run a ad hoc with relative date filter WEEK and then  WEEK+1 i get Novemver 23 2014 on both views.

tim_16's picture
2
Joined: Dec 20 2013 - 1:21pm
Last seen: 8 years 10 months ago

2 Answers:

Which version of JasperReports Server are you using? There was a bug in the earlier releases with dates and I think there was some remaining in the current release as well. Check Tracker to find any reported bug on using dates in adhoc to see if it's already been reported.

hozawa's picture
190547
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

Here is the way one of my coworkers put it: "Jasper’s implementation of relative dates works by returning a date range object to the report, rather than a specific date. The object can then be queried programmatically for a start date and end date. It seems the JasperReports engine already does this by assuming the first date in a “between” filter would correspond to the start date and the second date would correspond to the end date.  For example, if you created a parameter called DateRange and set it to be a relative date type and set the value to “MONTH-1” the code will create an object that has a start date of the first day of last month (at 00:00:00.000) and an end date of the last day of the month (at 23:59:59.999). A developer could then call DateRange.getStart() or DateRange.getEnd() each of which returns a java.util.Date."

H Mendoza's picture
1971
Joined: Feb 20 2013 - 11:39am
Last seen: 4 years 3 months ago
Feedback