Crystal Reports Basic for Visual Studio 2008
CrystalReportViewer.DrillDownSubreport Event

Event fires when the user drills down on a subreport.

Namespace   CrystalDecisions.Web
Assembly  CrystalDecisions.Web (CrystalDecisions.Web.dll)
Syntax

Visual Basic (Declaration)
Public Event DrillDownSubreport As CrystalDecisions.Web.DrillSubreportEventHandler
C#
public event CrystalDecisions.Web.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.
PropertyDescription
CurrentSubreportNameGets the subreport name that was drilled into.
CurrentSubreportPageNumberGets the current page number of the subreport.
CurrentSubreportPositionGets the current location of the subreport in the CrystalReportViewer control.
HandledGets or sets whether the event was handled. Set to True if you do not want the default action to occur.
NewSubreportNameGets the new page number of the subreport.
NewSubreportPageNumberGets the new location of the subreport in the CrystalReportViewer control.
NewSubreportPositionGets the subreport name that was drilled into.
Remarks

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

Example

This example shows how to set the text of a label to the name of the subreport that was drilled down on.

Visual Basic
      Private Sub MyCrystalReportViewer_DrillDownSubreport _
         (ByVal source As Object, _
         ByVal e As CrystalDecisions.Web.DrillSubreportEventArgs) _
         Handles CrystalReportViewer.DrillDownSubreport
      
         Label.Text = e.CurrentSubreportName
      
      End Sub
C++
      void crystalReportViewer_DrillDownSubreport (Object* sender, CrystalDecisions::Web::DrillSubreportEventArgs * e)
      {
         Label1->Text = e->CurrentSubreportName;
      };
C#
      private void crystalReportViewer_DrillDownSubreport_(object source, CrystalDecisions.Web.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

Page view tracker