PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
iAddBookmark (Function)
In French: iAjouteSignet
Adds a bookmark into the print preview or during the export in PDF.
In the print preview, a treeview is used to reach the position of the generated bookmarks.
Example
// Print in Print Preview mode
iPreview()

// Add the root bookmark
iAddBookmark("Root", "MyDocument")

// Add a bookmark at the top of the first page
iAddBookmark("Page 1", "Page 1", "Root")

// Positions a bookmark and a text at 5 cm from the top of the page
iYPos(50)
iAddBookmark("Page 1 line 1", "First line of the first page", "Page 1")
iPrint("First line of the first page")

// Print the page 2
iSkipPage()

// 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
iEndPrinting()
Syntax
<Result> = iAddBookmark(<Bookmark Identifier> , <Caption> [, <Parent Identifier>])
<Result>: Boolean
  • True if the bookmark was added,
  • False if a problem occurred.
<Bookmark Identifier>: Character string (with quotes)
Unique identifier of bookmark. A WLanguage error occurs if this identifier already exists.
<Caption>: Character string (with quotes)
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 (with quotes)
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.
Remarks
  • 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, ...)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
See also
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment