sabmoonie Posted July 27, 2015 Posted July 27, 2015 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.[/code]// ===================== 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)
sabmoonie Posted August 13, 2015 Author Posted August 13, 2015 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now