I´m not asking how to calculate minutes to hh:mm in java. I´m asking the best way to do it in jaspersoft. Because it´s done and it works. i´m only interseted in the print part in the report in the format "hh:mm "h""
I'm working in a report that must print the time in hh:mm format. (I´m editing a current production report and I want to do the minnor changes posible).
In BD we have at DateTime (DateTimeOffset) the Start and the End of the event.
This is a summatory of all the events the worker had done in a period of time.
Nowadays the report works getting per row the minutes between end and start. And then make a variable (That is a Sum of all the minutes). I do this with several variables because at the end the time is calculate in base of some checks the user has.
I have one more variable to add this minutes to the total if are checked.
And at the end in the Text Field I print this with :
($V{Total_Time}/60)+ ":"
+ (IF($V{Total_Time}%60 < 10,"0"+$V{Total_Time}%60,$V{Total_Time}%60))
+" h"
The type of Total_Time variable is Integer
I´m looking for a best way to do this