John Cassell
Well-known member
- Joined
- Mar 20, 2007
- Messages
- 65
- Programming Experience
- Beginner
Hi,
Would someone be able to tell me how to display the time it has taken for a report to run to the user pls.
I was using this code:
but this gives a value of 1 second no matter how long it has actually taken. It seems to be populating my label 'Rep_Time' with a value immediately after the report has started rather than when it has actually finished.
Any ideas?
Thanks
John
Would someone be able to tell me how to display the time it has taken for a report to run to the user pls.
I was using this code:
VB.NET:
Private Sub Run_Report_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Run_Report.Click
Dim reportstart = Now
Me.ReportViewer1.RefreshReport()
Rep_Time.Text = "Report Load Time: " & FormatNumber(DateDiff(DateInterval.Second, reportstart, Now), 2)
End Sub
but this gives a value of 1 second no matter how long it has actually taken. It seems to be populating my label 'Rep_Time' with a value immediately after the report has started rather than when it has actually finished.
Any ideas?
Thanks
John