Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How to create a TppLine in a region at runtime

edited September 2010 in General
I'm trying code similar to the following in order to create several
lines in a region at runtime. But the lines never appear on the quote.
What am I doing wrong here?

Thanks,

Jason

for i := 1 to mmoDetailLabels.Lines.Count do
begin
ln := TppLine.Create(rgnDetails);
ln.ParentWidth := True;
ln.Left := rgnDetails.Left;
ln.Style := lsSingle;
ln.Top := (rgnDetails.Top + (0.01));
ln.Position := lpBottom;
ln.Height := lnTop.Height;
ln.Weight := 1.0;
ln.Visible := True;
end;

Comments

  • edited September 2010
    - When adding an element to a region, set its Region property, when adding
    an element to a band, set its Band property.

    - The Report.Owner should be the Owner of all elements.

    Example:

    myLine := TppLine.Create(myReport.Owner)
    myLine.Region := myRegion;


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.