Position of an objet in the footer band

Hello,

To know the position of an object on the physical page, after calling the .Prepare() function, I can use the values AbsBounds, AbsTop, etc., divided by FastReport.Utils.Units.Centimeters. This seems correct (taking into account the margins of the page).

But if I try to find the position of an object in the footer, the result doesn't look good.

Which method should I use in this case?

Thank you.

Comments

  • Hello!

    After calling `report.Prepare()`, the coordinates must be read from the prepared objects on the prepared page (`report.PreparedPages.GetPage(i)`) rather than from the original template objects in `PageFooterBand`:

    In the original template, PageFooter.Objects[0].AbsTop does not reflect the final position at the bottom of the page (it is calculated by the engine only when the footer is placed at the end of the page).

    In the prepared report, `prepPage.AllObjects.OfType<TextObject>()` already contains the physical `AbsTop` coordinate relative to the top edge of the page’s print area (`AbsTop / Units.Centimeters`).

    Also note that `AbsTop` in the prepared report is measured within the print area (after subtracting `TopMargin`).

This discussion has been closed.