DrillEventArgs Class
Provides data for the Drill event.
Namespace CrystalDecisions.Windows.Forms Assembly CrystalDecisions.Windows.Forms (CrystalDecisions.Windows.Forms.dll)
Syntax
'Declaration
Public Class DrillEventArgs
Inherits ViewerEventArgs
public class DrillEventArgs : ViewerEventArgs
Remarks
The DrillEventArgs class contains the data related to the Drill event. The Drill event is raised by the CrystalReportViewer control when a user drills down into a report. This can be by drilling down into a group or chart. It will also occur when an item is selected in the group tree.
Example
The following example gets the details of the Drill event and creates a new entry in the event log.
'Declaration
Private Sub LogDrillEvent(ByVal source As Object, _
ByVal e As CrystalDecisions.Windows.Forms.DrillEventArgs) Handles _
CrystalReportViewer.Drill
Dim eventLog As New EventLog("event.log")
Dim eventMsg As String = _
"Drill event:" & vbCrLf & _
"IsDrillDown: " & e.IsDrillDown() & vbCrLf & _
"CurrentGroupLevel: " & e.CurrentGroupLevel & vbCrLf & _
"NewGroupLevel: " & e.NewGroupLevel & vbCrLf & _
"CurrentGroupName: " & e.CurrentGroupName & vbCrLf & _
"NewGroupName: " & e.NewGroupName & vbCrLf & _
"CurrentGroupPath: " & e.CurrentGroupPath & vbCrLf & _
"NewGroupPath: " & e.NewGroupPath
eventLog.WriteEntry(eventMsg)
e.Handled = False
End Sub
private void LogDrillEvent(Object source,
CrystalDecisions.Windows.Forms.DrillEventArgs e)
{
System.Diagnostics.EventLog eventLog =
new System.Diagnostics.EventLog("event.log");
string eventMsg =
"Drill event:" + "\n" +
"IsDrillDown: " + e.IsDrillDown() + "\n" +
"CurrentGroupLevel: " + e.CurrentGroupLevel + "\n" +
"NewGroupLevel: " + e.NewGroupLevel + "\n" +
"CurrentGroupName: " + e.CurrentGroupName + "\n" +
"NewGroupName: " + e.NewGroupName + "\n" +
"CurrentGroupPath: " + e.CurrentGroupPath + "\n" +
"NewGroupPath: " + e.NewGroupPath;
eventLog.WriteEntry(eventMsg);
e.Handled = false;
}
Inheritance Hierarchy
Object
EventArgs
ViewerEventArgs
DrillEventArgs
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
DrillEventArgs Members
CrystalDecisions.Windows.Forms Namespace