Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Tools and Features
ReportViewer Class
 Reset Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
 
ReportViewer.Reset Method 

Resets the control to its default values.

Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)

Visual Basic (Declaration)
Public Sub Reset
Visual Basic (Usage)
Dim instance As ReportViewer

instance.Reset
C#
public void Reset ()
C++
public:
void Reset ()
J#
public void Reset ()
JScript
public function Reset ()

Calling the Reset method cancels any current rendering and resets the ReportViewer control to its default state. The existing LocalReport object is replaced with a new instance.

NoteNote

Because the LocalReport object is replaced with a new instance when Reset is called, any reference to the SubreportProcessing event handler is removed. You must reinstate the SubReportProcessing event handler after calling Reset to handle sub-report processing events.

C#
private void button1_Click(object sender, EventArgs e)
{
   reportViewer.Reset();
}
Visual Basic
Private Sub Button1_Click(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles Button1.Click
   ReportViewer1.Reset()
End Sub
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker