Posted 24 May 2018, 5:19 am EST
We have an RDL report template which includes a static cover page (as subreport), a Table of Contents control and a container which serves as a placeholder for multiple subreports that are added dynamically from code to the report. It also has a header and footer. Everything works fine so far.
Now we are trying to add a “watermark” to the report pages with the following requirements:
- it is text-only
- it must be printed vertically on the right margin
- it must exist in the previewer as well as on exports and prints
- it must be possible to show a different (or no) watermark on different pages
Avenues we investigated for the solution:
- A Textbox with a 90° angle on the right margin. Only works properly on (fixed) PageReports which we cannot use due to our dynamic subreport compilation, so our report is not really page-oriented.
- A PDF watermark on export. Only allows watermarks on export to PDF and positions the watermark always in the middle of the page.
- A background image (text converted to an image). Makes positioning on the right page margin difficult (white padding to the top and left). However it does not seem to allow for different background images on different pages.
- Do #3 and split up the report in multiple RdlReports depending on the number of different watermarks we need. This does not allow for a correct Table of contents though, and combining the multiple report documents into a single one does not seem possible.
Solution #3 looks like the most promising. We tried specifying an expression for the background image to make it dependent on the page number like ```
=IIF(Globals!PageNumber > 10, “someWatermark.png”, “someOtherWatermark.png”)
What can we do to get a watermark that fulfills above requirements?