Share via


CrystalReportViewer.OnDrillDownSubreport Method

Synchronizes the DrillDownSubreport event between two CrystalReportViewer controls by acting as the default event handler for the second control.

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

Syntax

'Declaration
Public Overrideable Sub OnDrillDownSubreport ( _
    ByVal source As Object, _   
    ByVal e As CrystalDecisions.Web.DrillSubreportEventArgs _   
) 
public virtual void OnDrillDownSubreport (
    object source,
    CrystalDecisions.Web.DrillSubreportEventArgs e
)

Parameters

  • source
    The CrystalReportViewer control.
  • e
    The data that is related to the DrillDownSubreport event.

Remarks

When the DrillDownSubreport event is fired in a CrystalReportViewer (call it CrystalReportViewer1) the OnDrillDownSubreport method acts as the default event handler for another CrystalReportViewer (call it CrystalReportViewer2). This scenario occurs when a new DrillSubreportEventHandler is created for CrystalReportViewer1 that uses the address of the OnDrillDownSubreport method of CrystalReportViewer2 as the argument. When the user drills down on the subreport in CrystalReportViewer1 the subreport in CrystalReportViewer2 will mirror the activity of the report in CrystalReportViewer1. Any DrillDownSubreport event code in CrystalReportViewer2 is ignored, as the event in CrystalReportViewer2 is not fired. If the user drills down on the subreport in CrystalReportViewer2 then the DrillDownSubreport event for CrystalReportViewer2 and any subsequent code will execute.

This method can be used to help compare data between two reports. For example a web application displays two monthly sales reports, one for December and one for January. When the subreport in the December sales report is drilled into the January report mirrors the actions of the December report. The user is able to compare the sales figures between the two reports without having to duplicate their actions for each report.

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