Place an object on Page during Runtime

Hi,

how can I place an object on the entire page? The height and width of the
object should be the same as the page itself.

I'm using the following code, but the object sizes are not ok because
the margins are not considered.

Memo:= TfrxMemoView.Create(dm.frxReport1.Pages[0]);
Memo.CreateUniqueName;
Memo.Text:= 'Demo Report';
Memo.Left:= 0;
Memo.Top:=0;
Memo.Width:= dm.frxReport1.pages[0].Width; <-- too big
Memo.Height:= dm.frxReport1.pages[0].height; <-- too big
Memo.Font.Size:= 24;
Memo.WordBreak:= False;
Memo.WordWrap := False;

How can I get the correct width and height for the object?

Juergen

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:18AM
    try using
    property PageHeight: Extended;
    Returns the height of the page???s printable region.
    property PageWidth: Extended;
    Returns the width of the page???s printable region.
    ;)
  • edited December 2004
    sure, you are right, but these properties contains the values of the page
    in [mm]. This is not what I want. If I place the object on the whole page I
    need the values in [pixel] or so.

    I repeat what I want:

    First I load a report and after that I want to modify the report by
    adding an object which should be placed over the whole page.
    How can I do this?

    I got another problem:
    The object which I create during runtime is seen in the preview page
    but its not printed!!!! Why not? Please help.

    Juergen
  • gordkgordk St.Catherines On. Canada.
    edited 3:18AM
    The best bet is to add an overlay band containing a memo to the design
    set properties for band and memo as required.
    it can be placed below the footer when printing it will start at top of page.
    then all you need to do is control its visibility from code at run time.
    you could even add the band and memo from code at runtime.
    Also when you retreive a property and it is not in the measurement you would like
    use fr's conversion constants to convert it.
    ;)
  • edited 3:18AM
    can you post an example how to do it?
  • edited December 2004
    I found the bug.

    We are using the property ROTATION. Its working in the preview window
    but its not working during printout. If I set ROTATION to 0 then the object is
    printed.

    Dou you have a workaround or solution?

    How can set this object to foreground during runtime by code?

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.