Jump to content

Recommended Posts

Posted

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.

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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.

Posted

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

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