CrystalReportViewerBase.ReportPartBookmarkNavigation Event
Event fires after navigation to a report part in the same report or another report is finished.
Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)
Syntax
'Declaration
Public Event ReportPartBookmarkNavigation As CrystalDecisions.Web.ReportPartBookmarkNavigationEventHandler
public event CrystalDecisions.Web.ReportPartBookmarkNavigationEventHandler ReportPartBookmarkNavigation
Event Data
The event handler receives an argument of type ReportPartBookmarkNavigationEventArgs containing data related to this event. The following ReportPartBookmarkNavigationEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Handled | Gets or sets whether the event was handled. Set to True if you do not want the default action to occur. |
| NavigationResult | The page number, section number, and drill-down context to which the CrystalReportViewer control will jump in the report part navigation. |
| ReportPartBookmark | This is the report part bookmark information attached to the report object that the user clicked. |
Remarks
This event will be raised when a user navigates to another object in the same report or another report by clicking on a field or a chart.
To define a report part bookmark, go to the report designer. Right-click on a report object, and then click Format x, where "x" is the type of the object (for example "Format Field"). In the Format Editor dialog, click the Hyperlink tab and then select Another Report Object in the DHTML Viewer Only area. You can then enter details on the report part to which you want to navigate.
Example
This example shows how to set a label's text to the data context information from the book marked report object and a label to the navigation results of the event.
'Declaration
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;
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports .NET 9
See Also
Reference
CrystalReportViewerBase Class
CrystalReportViewerBase Members
CrystalDecisions.Web Namespace