ActiveReports.Viewer3 Request technical support
AddBookmark Method
See Also  Example


strBookmark
Specifies the name of the bookmark.  You can use backslash "\"  as a path separator to create a hierarchy of bookmarks.
offset
Specifies the location of the bookmark on the page.
Adds a bookmark to the page at the specified offset.

Syntax

Visual Basic (Declaration) 
Public Function AddBookmark( _
   ByVal strBookmark As String, _
   ByVal offset As Single _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As Page
Dim strBookmark As String
Dim offset As Single
Dim value As Integer
 
value = instance.AddBookmark(strBookmark, offset)
C# 
public int AddBookmark( 
   string strBookmark,
   float offset
)

Parameters

strBookmark
Specifies the name of the bookmark.  You can use backslash "\"  as a path separator to create a hierarchy of bookmarks.
offset
Specifies the location of the bookmark on the page.

Return Value

Index of the new bookmark in the document.

Example

C#Copy Code
private void Detail_Format(object sender, System.EventArgs eArgs)
{
   
for(int i = 0; i<Document.Pages.Count;i++)
   {
       
this.Document.Pages[i].AddBookmark("New Bookmark", 25);
   }
}
Visual BasicCopy Code
Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
    Dim i As Integer
    Try
        For i = 0 To Me.Document.Pages.Count - 1
            Me.Document.Pages(1).AddBookmark("New Bookmark", 8)
        Next
    Catch ex As Exception
    End Try
End Sub

Remarks

Bookmarks appear in the viewer's table of contents.

See Also