This documentation is archived and is not being maintained.

CrystalReportViewer.Navigate Event

Visual Studio 2005

Event fires when the user navigates through a report.

[Visual Basic]
        Public Event Navigate As CrystalDecisions.Windows.Forms.NavigateEventHandler
[C#]
        public event 
        CrystalDecisions.Windows.Forms.NavigateEventHandler
         Navigate;
      

Event Data

The event handler receives an argument of type CrystalDecisions.Windows.Forms.NavigateEventArgs containing data related to this event. The following CrystalDecisions.Windows.Forms.NavigateEventArgs properties provide information specific to this event.

Property Description
CurrentPageNumber

Gets the current page number.

Handled

Gets or sets whether the event was handled. Set to true if you do not want the default action to occur.

NewPageNumber

Get the page that is being navigated to.

Remarks

This event will be raised when a user navigates through a report.

Example

This example demonstrates how to set a label to the page number that was navigated to.

      [C#]
      private void crystalReportViewer1_Navigate_1(object source, CrystalDecisions.Windows.Forms.NavigateEventArgs e)
      {
         Label1.Text = e.NewPageNumber.ToString();
      }
      
      [C++]
      void crystalReportViewer1_Navigate (Object* sender, CrystalDecisions::Windows::Forms::NavigateEventArgs * e)
      {
         Label1->Text = e->NewPageNumber->ToString();
      };
      
      [VB]
      Private Sub CrystalReportViewer1_Navigate(ByVal source As Object, _
         ByVal e As CrystalDecisions.Windows.Forms.NavigateEventArgs) Handles _
         CrystalReportViewer1.Navigate
      
         Label1.Text = e.NewPageNumber
      
      End Sub
      

Requirements

Namespace   CrystalDecisions.Windows.Forms

Assembly  CrystalDecisions.Windows.Forms (CrystalDecisions.Windows.Forms.dll)

See Also

CrystalReportViewer Class | CrystalReportViewer Members | CrystalDecisions.Windows.Forms Namespace

Show: