Any way to get track of the absolute postion on a 'printing' page?
Hi,
I need to print a vertical line on each page printed. The report consists of
multiple subreports. The height of the line can be different on each page. I
placed the vertical line on the reports PageStyle, its top is fixed, only
the height needs to be calculated.
Is it possible to get track of the absolute postion on a page after its
footerband fi is done printing and use that position as reference to calc
the height of the vertical line? Would this work or is there an easier way?
Greetings,
Filip Moons
I need to print a vertical line on each page printed. The report consists of
multiple subreports. The height of the line can be different on each page. I
placed the vertical line on the reports PageStyle, its top is fixed, only
the height needs to be calculated.
Is it possible to get track of the absolute postion on a page after its
footerband fi is done printing and use that position as reference to calc
the height of the vertical line? Would this work or is there an easier way?
Greetings,
Filip Moons
This discussion has been closed.
Comments
This may be possible during the first pass of the report. Where exactly
would you like to measure to?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The last band printed on each page is a ppGroupFooterBand, so if i can get
the postion on the page after that band is printed that would be nice. All
my reports involved 'units' are set to 'utMMThousandths'.
Greetings,
Filip Moons
Try checking the Report.Engine.PrintPosRect.Top property inside the
GroupFooterBand.AfterPrint event. This should give you the value of the
vertical position just after the band in microns.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Could u please reply...
Thank you
same value (6350) for every page and the GroupFooterBand's location is
different for every page
showmessage(IntToStr(rptLYACT.Engine.PrintPosRect.Top));
position of the engine within the band, i wanted absolute positioning.
Bottom position of the engine within the page at a given moment
In my testing the following code correctly added a vertical line to the
report that dynamically altered its size according to the position of the
group footer.
procedure TForm1.ppGroupFooterBand1AfterPrint(Sender: TObject);
var
liCurrentPosition: Integer;
lDrawLine: TppDrawLine;
begin
liCurrentPosition := ppReport1.Engine.PrintPosRect.Top;
lDrawLine := TppDrawLine.Create(self);
lDrawLine.Page := ppReport1.Engine.Page;
lDrawLine.LinePosition := lpRight;
lDrawLine.Left := ppReport1.PrinterSetup.PageDef.mmMarginLeft;
lDrawLine.Top := ppReport1.PrinterSetup.PageDef.mmMarginTop;
lDrawLine.Width := 4000;
lDrawLine.Height := liCurrentPosition;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
instead of the childreport.Engine.PrintPosRect.Top to which the
ppGroupFooterBand belonged.
Thanks for the info.
Greetings,
Filip Moons