Putting a watermark under lines or boxes

Wednesday 28 December 2016 @ 12:04 am

Crystal will allow you to layer or superimpose images and text. Sometimes this is done intentionally using a faint image which creates a watermark effect behind the text. But if you are using lines or boxes with your text, the watermark won’t behave the same way. For some reason, text objects can be set to appear “in front of” an image or can be “moved to the back”. But Crystal lines and boxes will always appear “behind” an image. So if you put a watermark image behind a section that has both text and lines, the text can be moved to the front and will appear but the lines will always be hidden behind the image. Here are the 4 workarounds:

1) Use an empty text object with a border instead of a line or a box.
An empty text object can have a border on one side to make a line or on all four sides to make a box. And because this is not a true line or box object it will still give you the option to keep it in front of an image. The downside is that borders only come in one thickness which is thicker than the hairline people often want for their lines and boxes.

2) Put the lines and boxes in a subreport.
For some reason, if the image is in the main report and the lines/boxes are in a subreport, the lines/boxes can be kept in front of the image. Some users put both the text and the lines/boxes in the subreport. Of course subreports add another layer of complexity. And if the subreport requires a repeating query it can be a real performance killer.

3) Use an OLE object for the lines or boxes
You can add an OLE object like an Excel spreadsheet or a Word Doc, and draw your lines and boxes in the OLE document. The OLE object can be moved to be in front of the watermark image and then it will be visible.

4) Modify the image itself to include the lines and boxes.
OK, this is punting, but it works in cases where the lines and boxes are always in the same place relative to the image.

Leave a Reply

Recrystallize Pro

Crystal Reports Server