In french: iAjouteSignet
Adds a bookmark in the report viewer or when exporting to PDF.
In the report viewer, a tree structure allows you to reach the position of the generated bookmarks.
// Print in "Report viewer" mode
// Add the root bookmark
// Add a bookmark at the top of first page
iAddBookmark("Page 1", "Page 1", "Root")
// Positions a bookmark and a text at 5 cm from the top of the page
iAddBookmark("Page 1 line 1", "First line of the first page", "Page 1")
iPrint("First line of the first page")
// Print the page 2
// Add a bookmark at the top of the page
iAddBookmark("Page 2", "Page 2", "Root")
// Print two lines
iPrint("First line of the second page")
iPrint("Second line of the second page")
// Adds a bookmark for the third line
iAddBookmark("Page 2 line 3", "Third line of the second page", "Page 2")
iPrint("Third line of the second page")
// End of print
<Result> = iAddBookmark(<Bookmark identifier> , <Caption> [, <Parent identifier>])
- True if the bookmark was added,
- False if a problem occurs.
<Bookmark identifier>: Character string
Unique identifier of bookmark. A WLanguage error occurs if this identifier already exists.
<Caption>: Character string
Caption of bookmark. This caption will allow the user to directly access the section of text corresponding to the bookmark.
<Parent identifier>: Optional character string
Unique identifier of the parent bookmark of the bookmark to create.
If this parameter is not specified, the bookmark is created at the root.
If the identifier of the parent does not exist, <Result> returns False and the bookmark is created at the root.
- During the programmed prints, the bookmark is created at the current position.
- When printing a report, iAddBookmark must be used in the print code of a control or block. Then, the bookmark is created at the position of the corresponding control or block.
Training (WINDEV): WD Reports
Business / UI classification: Neutral code
This page is also available for…