diff --git a/components/powerpdf/PReport.pas b/components/powerpdf/PReport.pas index 0607d287e..4d9a58560 100644 --- a/components/powerpdf/PReport.pas +++ b/components/powerpdf/PReport.pas @@ -1819,8 +1819,8 @@ begin tmpWidth := PdfCanvas.TextWidth(FText); case FAlignment of - taCenter: XPos := Round((Width - tmpWidth) / 2); - taRightJustify: XPos :=Width - Round(tmpWidth); + taCenter: XPos := Round((Self.Width - tmpWidth) / 2); + taRightJustify: XPos :=Self.Width - Round(tmpWidth); else XPos := 0; end;