Designer - Watermark?

Is there a way in the designer to create a watermark and specify what image file to use?

I see some stuff via code maybe from a search, but nothing about doing it in the actual report designer.

Comments

  • edited 9:46PM
    jdredd wrote: »
    Is there a way in the designer to create a watermark and specify what image file to use?

    I see some stuff via code maybe from a search, but nothing about doing it in the actual report designer.


    If you haven't figured it out already, try using the overlay band. You then can put anything in the band such as a TfrxPictureView.
  • edited 9:46PM
    I implemented this feature using property ReportPage.BackPicture
  • gpigpi
    edited 9:46PM
    Also you can add text in TfrxReport.OnEndDoc event
    procedure TForm1.frxReport1EndDoc(Sender: TObject);
    var p: TfrxReportPage;
        m: TfrxMemoView;
        i: integer;
    begin
         frxReport1.Preview.Lock;
         for i := 0 to frxReport1.PreviewPages.Count - 1 do
           begin
             p:=TfrxReportPage(frxReport1.PreviewPages.Page[i]);
             m:=TfrxMemoView.Create(p);
             m.CreateUniqueName;
             m.SetBounds(0, 0, (p.PaperWidth  - p.RightMargin - p.LeftMargin) * fr01cm, (p.PaperHeight - p.TopMargin - p.BottomMargin) * fr01cm);
             m.Text := 'Demo';
             m.Rotation := 45;
             m.Font.Size := 128;
             m.VAlign := vaCenter;
             m.HAlign := haCenter;
             frxReport1.PreviewPages.ModifyPage(i,p);
           end;
         frxReport1.Preview.UnLock;
    end;
    

    or in TfrxReport.OnPrintPage event
    procedure TForm1.frxReport1PrintPage(Page: TfrxReportPage;
      CopyNo: Integer);
    var m: TfrxMemoView;
    begin
             m:=TfrxMemoView.Create(page);
             m.CreateUniqueName;
             m.SetBounds(0, 0, (page.PaperWidth  - page.RightMargin - page.LeftMargin) * fr01cm, (page.PaperHeight - page.TopMargin - page.BottomMargin) * fr01cm);
             m.Text := 'Demo';
             m.Rotation := 45;
             m.Font.Size := 128;
             m.VAlign := vaCenter;
             m.HAlign := haCenter;
    end;
    

Leave a Comment