The total execution time of a report is made up from several fases:
1. query analysis
2. data retrieval
3. formatting report(s)
I do not think there is a standard function that can monitor all these fases and come back with the duration.
The last fase is especially depended on power of your PC, number of other applications active etc.
Perhaps you could try something with the difference of Document-time and another timestamp.......... T. Blom
Information analyst
tbl@shimano-eu.com
You could take the time before and after the refresh with VBA, and assign the difference to an user variable.
Add the following code to the ThisDocument module of VBA. Refresh the document and you will have a variable called <Execution Time> with the time between before and after refresh.
[tt]
Option Explicit
Dim BeforeRefreshTime As Date
Private Sub Document_BeforeRefresh(Cancel As Boolean)
BeforeRefreshTime = Now
End Sub
Private Sub Document_AfterRefresh()
Dim ExecutionTime As Date
Dim FormattedTime As String
ExecutionTime = Now - BeforeRefreshTime
FormattedTime = Format(ExecutionTime, "Hh:Nn:Ss"
On Error Resume Next
DocumentVariables.Add "-", "Execution Time"
DocumentVariables("Execution Time".Formula = FormattedTime
End Sub
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.