13.07.2015 Views

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14.3 Creating a watermark by programmingDifferent methods can be used to create a watermark by programming:• Method 1: Full setting: using a Watermark variable• Method 2: Quick setting: direct use14.3.1 Method 1: Full setting: using a Watermark variableThis method is as follows:1. Define a Watermark variable. This variable contains all the characteristics of the watermark to print.2. Use iParameterWatermark to add the watermark into your report.3. Start printing the report.Example 1: Code used to print a watermark in background of a report created with the report editor:// Print a watermark in report backgroundMyWatermark is Watermark// Text of the watermarkMyWatermark..Text = "Confidential"// Font usedMyWatermark..Font..Name = "Arial"// The watermark will be centered horizontally// and at the bottomMyWatermark..Position = iCenterH + iBottom// Print previewiPreview()// Indicates that the watermark will be printed// during the print and in the duplicate copiesiParameterWatermark(iwatermarkPrinting + ...iwatermarkDuplicate, MyWatermark)// Starts printing the reportiPrintReport(RPT_Commercial)Example 2: Code used to print a watermark in background of a report created with the print functions:MyWatermark is Watermark// Text of the watermarkMyWatermark..Text = "Confidential"// Print previewiPreview()// Implement a watermark in document background// onlyiParameterWatermark(iwatermarkPrinting, MyWatermark)// Prints several pages with watermarkFOR i = 6 TO 10iPrint(" Page " + i)iSkipPage()END// The last page is empty and it has no watermark// Ends the printiEndPrinting()Part 1: Report editor 133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!