type is used to handle the text printed in watermark in the reports created with the report editor or through programming.
The Watermark type is used to define the advanced characteristics of the text in watermark. The characteristics of this text can be defined and modified using different WLanguage properties.
: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
// Print a watermark in report background
MyWatermark is Watermark
// Text of the watermark
MyWatermark.Text = "Confidential"
// Font used
MyWatermark.Font.Name = "Arial"
// The watermark will be horizontally centered at bottom
MyWatermark.Position = iCenterH + iBottom
// Print in the report viewer
// Indicates that the watermark will be printed during the print and in the duplicates
iParameterWatermark(iWatermarkPrinting + iWatermarkDuplicate, MyWatermark)
// Starts printing the report
Properties specific to Watermark variables
The following properties can be used to handle a text as watermark:
|Property name||Type used||Effect|
|Angle||Integer constant||Tilt angle of the watermark text. This angle can correspond to one of the following constants: |
- iFontAngle: the tilt angle of the text corresponds to the angle defined in the font.
- iDownwardDiagonal: the text is printed on a 45° downward diagonal.
- iUpwardDiagonal: the text is printed on a 45° upward diagonal.
- iHorizontal: the text is printed horizontally.
Before version 24, this property was named "Orientation".
|Font||Font variable||Characteristics of the font that must be used for the watermark text.|
|Opacity||Integer||Watermark text opacity percentage. This percentage varies from 0 (invisible text) to 100 (totally opaque text).|
|Position||Integer constant||Constant (or combination of constants) used to define the position of watermark text: |
- iBottom: the text is aligned at the bottom of the text area.
- iCenterH: the text is horizontally centered in the text area.
- iCenterV: the text is vertically centered in the text area.
- iRight: the text is aligned on the right of the text area
|Size||Integer constant||Font size. This size corresponds to one of the following constants: |
- iAutomatic: the font size is automatically chosen according to the length the watermark text and to the width of report.
- iFontSize: the size defined in the font is used.
|Text||Character string||Text of the watermark.|
Functions that use Watermark variables
|iParameterWatermark||Adds a watermark into a report (report created in the report editor or printed report). |
You can use VariableReset
to reset the content of a Watermark
Training (WINDEV): WD Reports