So currently I have a module scoped variable lngLastEnPage. I use this to determine my last English page as I know which section it occurs in per code below.
Then in the page footer I change the text I use. In reality I am using values from other hidden controls but for simplification, "Hello World".
Because of code reuse, I want to move everything related to report header and footer to a main report. I am thinking of adding a lastEnPage property to the sub report to return the variable... Anybody know if something like that will work and if not what avenue to try? I just have not done a lot of crazy stuff with reports to have the nuances of the timing down for subreports and pagination. It seems sound in principle. Just realized my real problem is that I am going to have to always have that property or value going down this path even if it is all English.
Then in the page footer I change the text I use. In reality I am using values from other hidden controls but for simplification, "Hello World".
Code:
Private Sub GroupHeader3_Format(Cancel As Integer, FormatCount As Integer)
'Needs placed on last section for English letter
If lngLastEnPage < Me.Page Then
lngLastEnPage = Me.Page
End If
End Sub
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
Dim lngPage As Long
lngPage = Me.Page
'Set Control according to value
If lngPage > lngLastEnPage Then
Me!txtFooter = "Hola Mundo"
Else
Me!txtFooter = "Hello World"
End If
End Sub
Because of code reuse, I want to move everything related to report header and footer to a main report. I am thinking of adding a lastEnPage property to the sub report to return the variable... Anybody know if something like that will work and if not what avenue to try? I just have not done a lot of crazy stuff with reports to have the nuances of the timing down for subreports and pagination. It seems sound in principle. Just realized my real problem is that I am going to have to always have that property or value going down this path even if it is all English.