I have a scheduled report with StartDate and EndDate parameters, but once the report runs the first time it seems to cache those values and never updates on the next days it runs.
I don't even set a value for the parameter, but default to new Date(System.currentTimeMillis()- 7*24*60*60*1000) and new Date(System.currentTimeMillis()- 1).
Has anyone figured out a workaround for this. Very basic functionality you would think for running dynamic reports....
You should use the relative dates feature. This enables you to enter a parameter like WEEK-1, MONTH-12 and this will give the parameters the dynamic property you require in your scheduled reports.
You need to give the parameter a class type of net.sf.jasperreports.types.date.DateRange. Then you will probably want to set some default values such as:
new net.sf.jasperreports.types.date.DateRangeBuilder(EDATE(new Date(),-12)).toDateRange()
More details available here: