I'm not sure how the best way to do this. I do not think you have any events to cling to them, but you could invent it. For example, for a header to call a function to set a header, and as a by-product, you call your own code function once:
Public Dim ReportTitle As String = "" Public Function GetTitleAndDoSomethingElse As String If (ReportTitle = "") Then ReportTitle = "My Report Title" ' Do your stuff that runs once here End If Return ReportTitle End Function
Then in the report header there is a text field that is set to:
=Code.GetTitleAndDoSomethingElse
Ugly, but has to do the trick.
source share