Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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:
© 2015 Microsoft