完成在同一份報表或另一份報表中導覽報表組件後觸發的事件。
命名空間 CrystalDecisions.Web 組件 CrystalDecisions.Web (CrystalDecisions.Web.dll)
語法
Public Event ReportPartBookmarkNavigation As CrystalDecisions.Web.ReportPartBookmarkNavigationEventHandler
public event CrystalDecisions.Web.ReportPartBookmarkNavigationEventHandler ReportPartBookmarkNavigation
事件資料
事件處理常式收到包含與此事件相關的資料之類型 ReportPartBookmarkNavigationEventArgs 的參數。下列 ReportPartBookmarkNavigationEventArgs 屬性提供此事件特有的資訊。
| 屬性 | 說明 |
|---|---|
| Handled | 取得或設定事件是否已處理。如果您不希望發生預設的動作,請設定為 True。 |
| NavigationResult | 瀏覽報表組件時,CrystalReportViewer 控制項會跳至的頁碼、區段編號和擷取細目內容。 |
| ReportPartBookmark | 此為連結使用者所按下之報表物件的報表組件書籤資訊。 |
註解
當使用者按一下欄位或圖表,以瀏覽同一份報表或另一份報表中的另一個物件時會引發的事件。
如需定義報表組件書籤,請至報表設計工具。在報表物件上按一下滑鼠右鍵,然後按一下 [x 格式設定],其中 "x" 為物件類型 (例如,「欄位格式設定」)。於 [格式編輯器] 對話方塊中,按一下 [超連結] 索引標籤,然後選取 [僅限 DHTML 檢視器] 區域中的 [其他報表物件 (R)]。然後即可在您要瀏覽的報表組件輸入詳細資訊。
範例
這個範例顯示如何將標籤文字設定為已標記書籤報表物件的資料內容資訊,並將標籤設定為事件的導覽結果。
Private Sub MyCrystalReportViewer_ReportPartBookmarkNavigation _
(ByVal source As Object, ByVal e As _
CrystalDecisions.Web.ReportPartBookmarkNavigationEventArgs) _
Handles CrystalReportViewer.ReportPartBookmarkNavigation
Label.Text = "Data Context: " + e.ReportPartBookmark.DataContext _
+ " Object Name: " + e.ReportPartBookmark.ObjectName _
+ " Report URI: " + e.ReportPartBookmark.ReportUri
Label2.Text = " PageNumber: " + e.NavigationResult.PageNumber + _
" SectionNumber: " + e.NavigationResult.SectionNumber + _
" GroupLevel: " + e.NavigationResult.DrillDownContext.GroupLevel + _
" GroupName: " + e.NavigationResult.DrillDownContext.GroupName + _
" GroupNamePath: " + _
e.NavigationResult.DrillDownContext.GroupNamePath;
End Sub
private void CrystalReportViewer_ReportPartBookmarkNavigation
(object source, CrystalDecisions.Web.ReportPartBookmarkNavigationEventArgs e)
{
Label.Text = "Data Context: " + e.ReportPartBookmark.DataContext
+ " Object Name: " + e.ReportPartBookmark.ObjectName
+ " Report URI: " + e.ReportPartBookmark.ReportUri;
Label2.Text = " PageNumber: " + e.NavigationResult.PageNumber +
" SectionNumber: " + e.NavigationResult.SectionNumber +
" GroupLevel: " + e.NavigationResult.DrillDownContext.GroupLevel +
" GroupName: " + e.NavigationResult.DrillDownContext.GroupName +
" GroupNamePath: " +
e.NavigationResult.DrillDownContext.GroupNamePath;
}
版本資訊
Crystal Reports Basic for Visual Studio 2008
自從 Crystal Reports .NET 9 開始支援
請參閱
參考
CrystalReportViewerBase 類別
CrystalReportViewerBase 成員
CrystalDecisions.Web 命名空間