Docentric AX allows adding a fixed watermark (e.g. 'COPY') to your reports such as Check or Customer invoice, but you can also add a dynamic watermark as we will describe in this article. In our case, we will use a template for Customer invoice and make Invoice number show up as the watermark.
Limitations
Because the watermark should be dynamic and bound to Invoice number, we cannot use MS Word's page watermark per se. However, we can achieve practically the same effect using an MS Word's textbox, so this is what we'll do in our template for Customer invoice.
What will we do?
We will insert a textbox in the header and set and lock its position absolutely. Next we will enter a field which will contain watermark text, set its font size and color and rotate the textbox, to have the watermark text displayed diagonally. We assume that if this field will contain no text, then no watermark will be printed.
Step 1: Insert the textbox in the header
First step is to insert the conditional tagging element in the header part of the document:
- Double-click in the header area
- Press Ctrl+Home twice to position the cursor on the beginning of the header
- Insert a Text Box:
Step 2: Bind the Field tagging element and set its formatting
Select the field which will contain the watermark text. In our case we will bind our Field tagging element to the InvoiceId field:
Click on the Field tag to select it and then set the font to be Bold, set the font size to 72 and choose the font color, which you want to use for the watermark text:
Then resize the text box to the width of the page:
Step 3: Position and rotate the text box
Click controls as indicated in the image below:
On the Layout dialog which pops-up set values as shown in the image below. Pay attention that all absolute positions refer to the Page.
Now the text box is positioned down on the page. Next we will rotate it. Click controls as indicated:
Set the values as shown below. Pay attention that height and width are absolute! Their values are usually OK, but you can experiment with them. Rotation is set to 315 degrees and scale is set to 100%:
Now you should see your text box properly sized and rotated:
The last thing to do is to get rid of the line around the text box. Right-click as indicated to open the pop-up menu where you can select Format Shape and set the Fill property to No fill and Line property to No line as indicated in the image below:
And that’s it. The template with the watermark is ready to go!
We can now run some tests and change the report data so that we make sure that it prints well. If necessary we adjust the size of the textbox which contains the text.
Additional features in the coming version
Next version of Docentric AX (3.3.4) will introduce two new tagging elements, variable and context, which will open even broader possibilities of variable watermarks in the report. This document will also be updated after the release of the new version.