Region and ppLine
HI All,
I want to dynamic create a report with a ppRegion and the Line is
inside the Region.
Actually all is ok with the reference to the sample dpr
DynamicReportCreationProj.dpr
But when the ppline has problem when set it the parentheight to true;
The ppLine stretch to the Band Height rather than just the Region Height.
The Following is the code to create the ppRegion and ppLine:
ppRegion := TppRegion(ppComponentCreate(aReport,TppRegion));
ppRegion.Top := lLabel.Top + lLabel.Height;
ppRegion.Pen.Color := clred;
ppRegion.Band := aReport.GetBand(btHeader, 0);
ppRegion.Stretch := False;
ppRegion.BottomOffset := 0.02;
ppRegion.ParentWidth := True;
t:= TppLine(ppComponentCreate(aReport,TppLine));
With t Do
Begin
Band:=aReport.GetBand(btHeader, 0);
t.Position := lpLeft;
t.pen.Color := clblue;
t.left := 0.0937;
t.Top := ppRegion.Top;
t.Height := ppRegion.Height;
ppRegion.AddObject(t);
// t.ParentHeight := True;
End;
// A general function add a memo to the region
AddColumnPrintAble(ppRegion,'New',0.09,0.09);
I just want to ppLine stretch to Region Height but now it stretch to the
Band 's Height.
Please advise
I want to dynamic create a report with a ppRegion and the Line is
inside the Region.
Actually all is ok with the reference to the sample dpr
DynamicReportCreationProj.dpr
But when the ppline has problem when set it the parentheight to true;
The ppLine stretch to the Band Height rather than just the Region Height.
The Following is the code to create the ppRegion and ppLine:
ppRegion := TppRegion(ppComponentCreate(aReport,TppRegion));
ppRegion.Top := lLabel.Top + lLabel.Height;
ppRegion.Pen.Color := clred;
ppRegion.Band := aReport.GetBand(btHeader, 0);
ppRegion.Stretch := False;
ppRegion.BottomOffset := 0.02;
ppRegion.ParentWidth := True;
t:= TppLine(ppComponentCreate(aReport,TppLine));
With t Do
Begin
Band:=aReport.GetBand(btHeader, 0);
t.Position := lpLeft;
t.pen.Color := clblue;
t.left := 0.0937;
t.Top := ppRegion.Top;
t.Height := ppRegion.Height;
ppRegion.AddObject(t);
// t.ParentHeight := True;
End;
// A general function add a memo to the region
AddColumnPrintAble(ppRegion,'New',0.09,0.09);
I just want to ppLine stretch to Region Height but now it stretch to the
Band 's Height.
Please advise
This discussion has been closed.
Comments
You need to set the TppLine.Region property equal to the region you would
like the line to be in. Other than this, everything else looks great.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com