我在 PageStart的时候生成了很多控件,其中包括2个textbox.
在 PageHeader_Format 的时候想把它们设成 页面信息,就是当前是第1页,共3页之类的。因为是分开显示的,不能用PageInfo这个控件。但是现在代码总不能正常显示。请帮我看一下。这两个控件都在PageHeader里面。谢谢
Private Sub PageHeader_Format(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageHeader.Format
Dim tb1 As New DataDynamics.ActiveReports.TextBox
Dim tb2 As New DataDynamics.ActiveReports.TextBox
For Each item As DataDynamics.ActiveReports.ARControl In Me.PageHeader.Controls()
If item.Name = "TEXT_1" Then
tb1 = CType(item, DataDynamics.ActiveReports.TextBox)
Continue For
End If
If item.Name = "TEXT_2" Then
tb2 = CType(item, DataDynamics.ActiveReports.TextBox)
Continue For
End If
Next
tb1.SummaryRunning = SummaryRunning.All
tb1.SummaryType = SummaryType.PageCount
tb2.SummaryType = SummaryType.PageCount
End Sub |
|