drunk8gods
Technical User
Hoping you all can help again.
I have a crosstab on a report footer of my report. It displays users by row, date by column and calculates the average time by seconds. I'm looking for it to display the average time by seconds as a hh:mm:ss format.
Example of how it displays now.
09/01 09/02 09/03
User 01 95 36 14
User 02 46 102 90
What I would like is to display:
09/01 09/02 09/03
User 01 00:01:35 00:00:36 00:00:14
User 02 00:00:46 00:01:42 00:01:30
I've gone into that field and gone into the Display String Settings and have pasted in the following formula:
//WhilePrintingRecords;
//NumberVar TotalSec := {field};
//
//NumberVar Hours := Truncate (Remainder ( TotalSec , 86400) / 3600) ;
//NumberVar Minutes := Truncate (Remainder ( TotalSec , 3600) / 60) ;
//NumberVar Seconds := Remainder (TotalSec , 60) ;
//
//
//Totext ( Hours , '00' ) + ':' +
//Totext ( Minutes , '00' ) + ':' +
//Totext ( Seconds , '00' )
Typically this would work to convert it to the hh:mm:ss format I want, but it isn't working correctly. If I place my crosstab in the report header, it repeats the first hh:mm:ss entry from the first ticket on the report for all the crosstab field entries. If I place the crosstab in the report footer, it repeats the value from the last ticket on the report.
I've uploaded screenshots to an imgur url hoping this will clarify my issue.
I have a crosstab on a report footer of my report. It displays users by row, date by column and calculates the average time by seconds. I'm looking for it to display the average time by seconds as a hh:mm:ss format.
Example of how it displays now.
09/01 09/02 09/03
User 01 95 36 14
User 02 46 102 90
What I would like is to display:
09/01 09/02 09/03
User 01 00:01:35 00:00:36 00:00:14
User 02 00:00:46 00:01:42 00:01:30
I've gone into that field and gone into the Display String Settings and have pasted in the following formula:
//WhilePrintingRecords;
//NumberVar TotalSec := {field};
//
//NumberVar Hours := Truncate (Remainder ( TotalSec , 86400) / 3600) ;
//NumberVar Minutes := Truncate (Remainder ( TotalSec , 3600) / 60) ;
//NumberVar Seconds := Remainder (TotalSec , 60) ;
//
//
//Totext ( Hours , '00' ) + ':' +
//Totext ( Minutes , '00' ) + ':' +
//Totext ( Seconds , '00' )
Typically this would work to convert it to the hh:mm:ss format I want, but it isn't working correctly. If I place my crosstab in the report header, it repeats the first hh:mm:ss entry from the first ticket on the report for all the crosstab field entries. If I place the crosstab in the report footer, it repeats the value from the last ticket on the report.
I've uploaded screenshots to an imgur url hoping this will clarify my issue.