ActiveReports 6 Online Help
History Property
Example 

Gets a reference to the viewer's page view history.
Syntax
'Declaration
 
Public ReadOnly Property History As History
public History History {get;}

Property Value

A History value that specifies the page view history.
Example
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);
}

private void btnClear_Click(object sender, System.EventArgs e)
{
    arv.ReportViewer.History.Clear();
    btnBack.Enabled = false;
    btnForward.Enabled = false;
}
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

Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    arv.ReportViewer.History.Clear()
    btnBack.Enabled = False
    btnForward.Enabled = False
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ReportViewerObject Class
ReportViewerObject Members

Send Feedback