Overlay again

I still have not received an answer to my overlay question, how do I use one properly with Fast Report to create a watermark effect?

It causes problems with other report sections, someone said they would post a way to do it in code to no avail, I needed an answer when I posted it and still have no idea what to do.

ANY help would be appreciated

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 2:09AM
    In designer add the overlay carefully after doing all other design work and make sure its boudaries do do not line up with any other objects, add the picture view to it and send to back.
    or at run time you could try this
    procedure TForm1.Button1Click(Sender: TObject);
    var
    page:tfrpage;
    v,v2:tfrview;
    b:tfrbandview;

    obindex,pgindex:integer;
    begin
    shownag := checkbox1.checked;
    frreport1.clear;
    frreport1.loadfromfile(wpath+'1.frf'); //load report sub your own name here

    for pgindex := 0 to frreport1.Pages.count-1 do //iterate through design pages
    begin
    page := frreport1.Pages[pgindex];//retreive design page
    if page.Prop= ptreport then // if not dialog
    begin
    for obindex := 0 to page.objects.count-1 do // iterate through objects on current design page
    begin
    v:= page.objects[obindex];
    if v is tfrmemoview then
    begin
    v.Prop := 2; // modify desired properties
    v.Prop := clred;
    end;

    end;
    // were back to current page
    if shownag then // shownag is global boolean variable set to true or false where and how is up to you
    begin
    //add band
    b := TfrBandView.Create; // create Title band(l,t,w,h)
    b.SetBounds(0, 300, 0, 70); // position and size in pixels(only Top and Height are significant for the band)
    b.BandType := btOverlay;
    b.name := 'Overlay1'; // set band type
    Page.Objects.Add( ;) ; // add it to the page
    v2 := TfrMemoView.Create; // create memo(l,t,w,h)in pixels
    v2.SetBounds(20, 305, 200, 16); // top and height are significant they should be in the range of the top and height bounds of the band.
    v2.BandAlign := babottom; // set band align property of memo

    v2.prop := 'nagmemo'; // set name not required,but makes trouble shooting or modification easier
    v2.Prop := frtaCenter; // set memo's internal alignment properties
    v2.prop:= 'Courier New';
    v2.prop := 8; // set font size
    v2.Prop := 6; // set memo's font style. value is sum of frstyle constants
    // bold 2,ital 1, underline 4 strikeout 8
    v2.Prop := clBlack; // any delphi color constant

    v2.prop := 15; // add a frame value is sum of frametype constants
    //right 1, bottom 2, left4, top 8
    v2.prop := psDouble; // set frame style value can be any framestyle constant.
    // psSolid, psDash, psDot, psDashDot, psDashDotDot,
    // psDouble
    v2.prop := 1; // set frame thickness
    v2.Memo.Add('Demo Version ');// add text and any variable refrence to be displayed in memo object
    Page.Objects.Add(v2); // add it to the page}
    end;

    end;
    end;


    frreport1.showreport;
    end;
    regards ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.