[#10531] - Relative Dates - net.sf.jasperreports.types.date.DateRange

Category:
Bug report
Priority:
High
Status:
Resolved
Project: Severity:
Major
Resolution:
Fixed
Component: Reproducibility:
Always
Assigned to:
0

Up to JasperStudio 6.4.0 the relative dates are working, all version above 6.4.0 return null when adding - or + operator to the defined date string key words.

relativeStartDate = new net.sf.jasperreports.types.date.DateRangeBuilder("YEAR").toDateRange()

getStartDate = $P{relativeStartDate}.getStart()

Text field expression $P{getStartDate}

When preview default is YEAR and date returns correctly.
i.e YEAR-1
When using YEAR/MONTH/WEEK/DAY etc - (any no. period) or YEAR etc. + (any no. period) then $P{getStartDate} returns null. Even if I select specific date from calendar, then null is returns. Same goes for end date.

When deploying to JasperServer 6.4.0 and input control for date value is set a YEAR-1 or specific date selected, then $P{getStartDate} return date correctly.

I even made use of jasperstudio built in function of DATERANGE( ) and issues is same as above.

v6.4.2
Jaspersoft Studio
joseng62's picture
492
Joined: Dec 5 2014 - 2:43am
Last seen: 1 week 3 days ago

3 Comments:

#1
  • Resolution:Open» Fixed
  • Status:New» Resolved
  • Assigned:nobody» chicuslavic

Thank you, fixed.

#2

Pleasure, fix will be in next release ?

#3

Hi chicuslavic, please could you indicate in which version has this issue been fixed?
I have installed Jaspersoft Studio 6.6.0 and the error is still present.
Even though the required libraries are added, I find that when I specify the class (net.sf.jasperreports.types.date.DateRange), the type is not picked up - refer screenshot.
In version 6.4.0, the correct type is listed and can be selected and used successfully

AttachmentSize
Image icon type.png38.49 KB
Feedback
randomness