Share via


CrystalReportViewer.DrillDownSubreport Event

Event fires when the user drills down on a subreport.

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

Syntax

'Declaration

Public Event DrillDownSubreport As CrystalDecisions.Web.DrillSubreportEventHandler
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.

Property Description
CurrentSubreportName Gets the subreport name that was drilled into.
CurrentSubreportPageNumber Gets the current page number of the subreport.
CurrentSubreportPosition Gets the current location of the subreport in the CrystalReportViewer control.
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 new page number of the subreport.
NewSubreportPageNumber Gets the new location of the subreport in the CrystalReportViewer control.
NewSubreportPosition Gets 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.

'Declaration

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

Reference

CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Web Namespace