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.
*/
@Function("YEARS")
@FunctionParameters({
@FunctionParameter("startDate"),
@FunctionParameter("endDate")})
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)
1 Answer:
Posted on August 13, 2015 at 1:32am
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.