General information
Category:
Reports & Report designer
You can use report variables. Define a variable nSeconds which has the following formula as Value to Store:
int(TimeOnsite) * 60 + (TimeOnSite - int(TimeOnSite)) * 100
Define another variable nAvgOnSite, as avg of nSeconds. In the group footer display
ltrim(str(int(nAvgOnSite))) + " minutes and " + ltrim(str((nAvgOnSite - int(nAvgOnSite)) * 100))
Vlad
>I have this report which displays Time In , Time Out, and the difference between them as Character fields in a report. The difference field is calculated and in the table.This has been calculated and converted to a decimal fraction. ie 2.25 minutes = 2 minutes and 15 seconds. The total column has an average of this difference using the AVG() function in the report.
>
>The client now wants the diff time in actual minutes and seconds - 2.15 = 2 minutes 15 seconds rather than in decimal base 10.
>
>The problem is in getting the totals and the Average difference as the records are grouped by client.
>
>Any wat this can be done. See below for how the report is needed:
>
>CLIENT NAME: AABB Transport Co.(group by)
>
>Time In Time Out Time Onsite
>12:45 13.25 00:40
>12:55 14:05 01:10
>-------------------------------
>Average Onsite == 00:55
>
>Client Name: Next Transport Co:
>
>
>
>.... and so on
>
>I need the 00:55 to be calculated
>
>Thanks
>
>Bernard
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only