Help / WLanguage / WLanguage functions / Standard functions / Print functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
iAddBookmark (Function)
In french: iAjouteSignet
Adds a bookmark in the report viewer or when exporting to PDF.
WINDEV 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
iAddBookmark("Root", "MyDocument")
// 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>])
<Result>: Boolean
  • 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.
Related Examples:
WD Reports Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report:

- prints based on different data sources (queries, variables, ...)
- prints based on controls (Table, Spreadsheet, PVT, ...)
- printing composite reports
- specific prints (portrait/landscape, report with watermark, report with bar code, ...)
Business / UI classification: Neutral code
Component: wd290prn.dll
See also
Minimum version required
  • Version 17
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help