Re: HOWTO: Watermarks???
"jason_hutchens" <[email protected]> Thu, 20 Jun 2002 08:16:20 -0000
| Newsgroups | gmane.comp.lang.delphi.quick-reports |
|---|---|
| Message-ID | <[email protected]> |
--- In quick-reports@y..., Tom Nesler <neslertom@y...> wrote: > Hi Jason! > --- jason_hutchens <hutch@a...> wrote: > > I really need to put a watermark on my reports (i.e. some text that > > floats behind everything else); I've tried everything to no avail. > > Floating text that's positioned behind everything, a floating image, > > nothing works. Does anyone know how to do this? Mucho appreciado ;^) > > As much as I hate to admit it, I don't think QR allows watermarks. > Here is why: The QR canvas is where each detail line, summary line, > etc is laid down. Therefore the trick is to print something on the > canvas before it goes to the print queue. I can't seem to find any > event that lets you overide what QR has painted earlier. If you try to > do it before the page is painted, QR ignores what you tried to put > down. This seems to happen even if there is only one line at the top > of the page...:-( > > I think you will have to create your report manually in order to use > watermarks. The key is to use light gray color to create the watermark > effect. Here is some sample code you can use to get the watermark > effect: > > with Printer do > begin > BeginDoc; > Canvas.Font.Color := TColor(clLtGray); > Canvas.Font.Name := 'Arial'; > Canvas.Font.Size := 96; > Canvas.Font.Style := [fsBold]; > Canvas.TextOut(100,100, 'TEST'); > EndDoc; > end; > > Hope this helps, > > > > ===== > Tom Nesler > > Live Long...Code Well... and Prosper! V > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com