Udostępnij za pośrednictwem


Metoda ReportViewer.Reset —

Resets the control to its default values.

Przestrzeń nazw:  Microsoft.Reporting.WinForms
Zestaw:  Microsoft.ReportViewer.WinForms (w Microsoft.ReportViewer.WinForms.dll)

Składnia

'Deklaracja
Public Sub Reset
public void Reset()
public:
void Reset()
member Reset : unit -> unit 
public function Reset()

Uwagi

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

[!UWAGA]

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.

Przykłady

private void button1_Click(object sender, EventArgs e)
{
   reportViewer.Reset();
}
Private Sub Button1_Click(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles Button1.Click
   ReportViewer1.Reset()
End Sub

Zobacz też

Informacje

ReportViewer Klasa

Przestrzeń nazw Microsoft.Reporting.WinForms