See Also

History Class  | History Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

Count Property

Returns the number of page views in the history.

[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}

Example

[C#] 

private void btnBack_Click(object sender, System.EventArgs e) 

    arv.ReportViewer.History.MovePrev(); 
    btnBack.Enabled = (arv.ReportViewer.History.Position >= 0); 
    btnForward.Enabled = (arv.ReportViewer.History.Position < arv.ReportViewer.History.Count); 

 
private void btnForward_Click(object sender, System.EventArgs e) 

    arv.ReportViewer.History.MoveNext(); 
    btnBack.Enabled = (arv.ReportViewer.History.Position >= 0); 
    btnForward.Enabled = (arv.ReportViewer.History.Position < arv.ReportViewer.History.Count); 
}

[Visual Basic] 

Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
    With arv.ReportViewer.History
        .MovePrev()
        btnBack.Enabled = (.Position >= 0)
        btnForward.Enabled = (.Position < .Count)
    End With
End Sub

Private Sub btnForward_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnForward.Click
    With arv.ReportViewer.History
        .MoveNext()
        btnBack.Enabled = (.Position >= 0)
        btnForward.Enabled = (.Position < .Count)
    End With
End Sub

See Also

History Class  | History Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.