Hello:
I have been struggling with this forever and I need one more step to complete this. I have a field on a report that is a string value and I need to add up the values into a sum within a running total field.
I have written the following formulas to convert the string into an integer and then back to the 00:00:00 format within the group footer. What I can't do is get the values to add up within the running total field. How can I do this, what steps did I miss? Where would this formula go? Any advice would be great, because I am ready to give up at this point. Thanks
formula one: in details section of report - - converts the string so I can add up to a sum.
WhilePrintingRecords;
numberVar result;
result := tonumber(left({ado.correctedduration},2))* 3600
+ tonumber(mid({ado.correctedduration},4,2)) * 60
+ tonumber(right({ado.correctedduration},2));
result;
formula two: in group footer of report, returns the value of the RTotal1 Running total field back to 00:00:00
whileprintingrecords;
numberVar dur:=Val({#RTotal1});
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs:=Truncate(Truncate(dur/60)/60);
min:=Remainder(Truncate(dur/60),60);
sec:=Remainder(dur,60);
hhmmss:=totext(hrs,"0"
+ ":" + totext(min, "00"
+ ":" + totext(sec, "00"
;
hhmmss
I have been struggling with this forever and I need one more step to complete this. I have a field on a report that is a string value and I need to add up the values into a sum within a running total field.
I have written the following formulas to convert the string into an integer and then back to the 00:00:00 format within the group footer. What I can't do is get the values to add up within the running total field. How can I do this, what steps did I miss? Where would this formula go? Any advice would be great, because I am ready to give up at this point. Thanks
formula one: in details section of report - - converts the string so I can add up to a sum.
WhilePrintingRecords;
numberVar result;
result := tonumber(left({ado.correctedduration},2))* 3600
+ tonumber(mid({ado.correctedduration},4,2)) * 60
+ tonumber(right({ado.correctedduration},2));
result;
formula two: in group footer of report, returns the value of the RTotal1 Running total field back to 00:00:00
whileprintingrecords;
numberVar dur:=Val({#RTotal1});
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs:=Truncate(Truncate(dur/60)/60);
min:=Remainder(Truncate(dur/60),60);
sec:=Remainder(dur,60);
hhmmss:=totext(hrs,"0"
hhmmss