ActiveReports.Viewer6 Send comments on this topic.
MovePrev Method
See Also  Example
ActiveReports.Viewer6 Assembly > DataDynamics.ActiveReports.Viewer Namespace > History Class : MovePrev Method

Navigates to the previous page in the view history.

Syntax

Visual Basic (Declaration) 
Public Function MovePrev() As Integer
C# 
public int MovePrev()

Example

C#Copy Code
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 BasicCopy Code
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

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also