SSRS: Showing the correct execution time on a two page report?

后端 未结 6 1194
萌比男神i
萌比男神i 2021-01-05 06:20

I\'m just wondering how I can show the correct execution time on a report?

Until recently I had been using the following in the footer of my reports as a label expre

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-05 06:50

    I'd build this using custom code:

    Public Dim ExecText As String
    
    Public Function ExecTime() As String
        If (ExecText = "") Then
            ExecText = // Calculate execution time here
        End If
    
        ExecTime = "Execution Time: " + ExecText
    End Function
    

    Then in your footer text box just put

    =Code!ExecTime()
    

    and your execution time will calculate just once for the first footer and after that will return the previously calculated result.

提交回复
热议问题