DrillSubreportEventArgs 類別
為 DrillDownSubreport
事件提供資料。
命名空間 CrystalDecisions.Web 組件 CrystalDecisions.Web (CrystalDecisions.Web.dll)
語法
Public Class DrillSubreportEventArgs
Inherits ViewerEventArgs
public class DrillSubreportEventArgs : ViewerEventArgs
註解
DrillSubreportEventArgs
類別包含與 DrillSubreport
事件相關的資料。CrystalReportViewer
引發 DrillSubreport
事件。
範例
下列範例會記錄報表的 DrillDownSubreport
事件。
Private Sub LogDrillDownSubreportEvent(ByVal source As Object, _
ByVal e As CrystalDecisions.Web.DrillSubreportEventArgs) Handles _
CrystalReportViewer.DrillDownSubreport
Dim eventLog As New EventLog("event.log")
Dim eventMsg As String = _
"DrillDownSubreport event:" & vbCrLf & _
"CurrentSubreportName: " & e.CurrentSubreportName() & vbCrLf & _
"NewSubreportName: " & e.NewSubreportName() & vbCrLf & _
"CurrentSubreportPageNumber: " & e.CurrentSubreportPageNumber() & vbCrLf & _
"NewSubreportPageNumber: " & e.NewSubreportPageNumber() & vbCrLf & _
"CurrentSubreportPosition: " & e.CurrentSubreportPosition().ToString & vbCrLf & _
"NewSubreportPosition: " & e.NewSubreportPosition().ToString
eventLog.WriteEntry(eventMsg)
e.Handled = False
End Sub
private void LogDrillDownSubreportEvent(Object source,
CrystalDecisions.Web.DrillSubreportEventArgs e)
{
System.Diagnostics.EventLog eventLog =
new System.Diagnostics.EventLog("event.log");
string eventMsg =
"DrillDownSubreport event:" + "\n" +
"CurrentSubreportName: " + e.CurrentSubreportName + "\n" +
"NewSubreportName: " + e.NewSubreportName + "\n" +
"CurrentSubreportPageNumber: " + e.CurrentSubreportPageNumber + "\n" +
"NewSubreportPageNumber: " + e.NewSubreportPageNumber + "\n" +
"CurrentSubreportPosition: " + e.CurrentSubreportPosition.ToString() + "\n" +
"NewSubreportPosition: " + e.NewSubreportPosition.ToString();
eventLog.WriteEntry(eventMsg);
e.Handled = false;
}
繼承階層
Object
EventArgs
ViewerEventArgs
DrillSubreportEventArgs
版本資訊
Crystal Reports Basic for Visual Studio 2008
自從 Crystal Reports for Visual Studio .NET 2002 開始支援