|
|
|
|
|
- Overview
- Creating a watermark from the report viewer
- Creating a watermark programmatically
- Method 1: Full setting: using a Watermark variable
- Method 2: Quick setting: direct use
Printing a watermark text
A report (and a duplicate copy) can include an additional text in the format of a watermark, such as "Confidential" or "Duplicate" printed across the report. The watermark can be created: - from the report viewer (WINDEV only).
- programmatically.
Remarks: - If a watermark is defined for a report, it is defined for all the pages of the report.
- A single watermark can be defined for each report. You cannot define several watermarks.
- The watermark is printed on the pages containing information only. It is not printed on empty pages.
Creating a watermark from the report viewer Creating a watermark programmatically Different methods can be used to create a watermark through programming: Method 1: Full setting: using a Watermark variable This method is as follows: - Define a Watermark variable. This variable contains all the characteristics of the watermark to print.
- Use iParameterWatermark to add the watermark into your report.
- Start printing the report.
For example: - WLanguage code used to print a watermark in the background of a report created with the report editor:
MyWatermark is Watermark
MyWatermark.Text = "Confidential"
MyWatermark.Font.Name = "Arial"
MyWatermark.Position = iCenterH + iBottom
iDestination(iViewer)
iParameterWatermark(iWatermarkPrinting + iWatermarkDuplicate, MyWatermark)
iPrintReport(RPT_Commercial)
- WLanguage code used to print a watermark in the background of a report created with the print functions:
MyWatermark is Watermark
MyWatermark.Text = "Confidential"
iDestination(iViewer)
iParameterWatermark(iWatermarkPrinting, MyWatermark)
FOR i = 6 TO 10
iPrint(" Page " + i)
iSkipPage()
END
iEndPrinting()
Method 2: Quick setting: direct use This method is as follows: - Use iParameterWatermark to specify the text of the watermark that will be added into your report. In this case, the "Arial" font is used, with an automatic size and with an opacity set to 20%.
- Start printing the report.
For example: - WLanguage code used to print a watermark in the background of a report created with the report editor:
iDestination(iViewer)
iParameterWatermark("Confidential")
iPrintReport(RPT_Commercial)
- WLanguage code used to print a watermark in the background of a report created with the print functions:
iDestination(iViewer)
iParameterWatermark(iWatermarkPrinting, "Confidential")
FOR i = 6 TO 10
iPrint(" Page " + i)
iSkipPage()
END
iEndPrinting()
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|