Share via


CrystalReportViewer.DrillDownSubreport Event

Event fires when the user drills down on a subreport.

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

Syntax

'Declaration

Public Event DrillDownSubreport As CrystalDecisions.Windows.Forms.DrillSubreportEventHandler
public event CrystalDecisions.Windows.Forms.DrillSubreportEventHandler DrillDownSubreport

Event Data

The event handler receives an argument of type DrillSubreportEventArgs containing data related to this event. The following DrillSubreportEventArgs properties provide information specific to this event.

Property Description
CurrentSubreportName Gets the subreport name that was drilled into.
CurrentSubreportPageNumber Gets the page number that the subreport is on.
CurrentSubreportPosition Gets the location in the CrystalReportViewer control where the subreport is.
Handled Gets or sets whether the event was handled. Set to true if you do not want the default action to occur.
NewSubreportName Gets the subreport name that is being drilled into.
NewSubreportPageNumber Gets the page number to drill into the subreport.
NewSubreportPosition Gets the location in the CrystalReportViewer control to drill into the subreport is.

Remarks

This event will be raised when a user drills down into a subreport.

Example

This example sets a label to the name of the subreport that was last drilled into. The action is triggered by the DrillDownSubreport event.

'Declaration

      Private Sub MyCrystalReportViewer_DrillDownSubreport(ByVal source As Object, _
         ByVal e As CrystalDecisions.Windows.Forms.DrillSubreportEventArgs) Handles _
         CrystalReportViewer.DrillDownSubreport
      
         Label.Text = e.CurrentSubreportName
      
      End Sub
      
      private void crystalReportViewer_DrillDownSubreport_1(object source, CrystalDecisions.Windows.Forms.DrillSubreportEventArgs e)
      {
         Label.Text = e.CurrentSubreportName;
      }
      

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Windows.Forms Namespace