How to create calculated field in domain designer for YEAR function?

I need to create a calculated field using a field in jasper domain designer. I have a field called Report Date. Form the Report Date field i need to create a calculate field which hold the Year of Report Date field.

I have tried the YEAR(Report Date)  function. But when i tried to use in reports i am gettign error. please help me on this.

raja.shekar's picture
Joined: Apr 21 2014 - 12:28am
Last seen: 8 years 2 weeks ago

What is the data type of 'Report Date'?

Exactly what error do you get?


djohnson53 - 8 years 3 weeks ago

I created the report using the  iReport and created the variable for report year and given the variable expression as below and the issue is fixed.

new Integer($F{"Field name" }.getYear()+1900).


Thanks for the reply.

raja.shekar - 8 years 3 weeks ago

0 Answers:

No answers yet