So, I have a histogram in crystal reports. In this graph, I have a data label attached to each of the graphs that displays the graph value in seconds, which looks like this:
What I would like to do is format this data label into time formatting. Therefore, for each column on the chart, a data label will be displayed in the following format:
HH: MM :. FROM.
I can get the time formatting using the following formula:
local NumberVar Sec; local NumberVar ss; local NumberVar mm; local NumberVar hh; local StringVar SSS; local StringVar MMM; Sec := Sum ({GetAlarmSummaryDataSet2Response/GetAlarmSummaryDataSet2Result/Items/AlarmSummaryItem2.StopTime}, {GetAlarmSummaryDataSet2Response/GetAlarmSummaryDataSet2Result/Items/AlarmSummaryItem2.Section}) ; hh := Int (Sec/3600); mm :=Int ((Sec/60)- (60* Int(Sec/3600 ))); If mm<10 then MMM := "0" & ToText (mm,0); If mm>9 Then MMM := ToText(mm,0) ; ss :=Sec-(3600 * hh ) - (60 * mm ) ; If ss<10 then SSS := "0" & ToText (ss,0); If ss>9 Then SSS := ToText(ss,0) ; ToText ( hh,0) & ":" & MMM & ":" & SSS
But I'm not sure how to implement this formula on a data label.
Any help or suggestions are welcome.
thanks
source share