Would this work for you:
nEnd = 0
nStart = SECONDS()
REPORT FORM MyReport Preview
? nEnd - nStart
In the OnEntry Expression of the Page Header band, use the following expression:
_VFP.SetVar('nEnd', IIF(_PAGENO=1, seconds(), nEnd))
NOTE: In VFP 9, there are BeforeReport and AfterReport methods in the ReportListener that you could use to do what you want. This would be more generic because you could create one reportlistener class with the code and wouldn't have to modify each report individually.
Cathy
>I have a need to time how long it takes to generate a report. This report is called with a report form command with Preview. Initially, I captured the starting time in the BeforeTableOpen event of the form, and calculated the number of seconds in the AfterCloseTables event. This works with the exception ending time is when the user clicks the print or close button the report preview toolbar. This would not accuratly reflect the "system" time to generate the report. I could not find another event to put in in the report.
>
>Thanks for pointers and help
>
>Kirk