Built-in Date and Time Functions not working

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hi all!

I am trying to get the difference between two DateTime objects for me to get a Person's age. I tried using YEARS() but then I encounter this problem.

. The method YEARS(DateTime, DateTime) is undefined for the type Overage32List32Report_1437995612351_291145
                value = YEARS(((org.joda.time.DateTime)field_birthdate.getValue()),((org.joda.time.DateTime)parameter_AsOfDate.getValue())); //$JR_EXPR_ID=20$
According to the DateTimeFunctions.java, my arguments should be accepted.
// ===================== YEARS function ===================== //
* Returns the number of years between two dates.
public Integer YEARS(Object startDate, Object endDate){
I already tried adding to build my project with jasper report 6.0.0 but it is still not working.
Kindly help guys T______________T
(sorry if i dont know how to put on a frame the codes)
sabmoonie's picture
Joined: Jul 3 2015 - 3:02am
Last seen: 3 years 9 months ago

1 Answer:

I was able to kinda fix this problem but not by using Jaspersoft. As I've read on other posts, it was said that this method is really currently not working on Jaspersoft. 

What I did on Eclipse was I created an object to hold the necessary data including the computation of Person's age.


sabmoonie's picture
Joined: Jul 3 2015 - 3:02am
Last seen: 3 years 9 months ago