Lazarus

Programming => Packages and Libraries => LazReport => Topic started by: mig-31 on September 09, 2022, 03:06:47 pm

Title: Lazreport Page.Margins bug
Post by: mig-31 on September 09, 2022, 03:06:47 pm
Hi all,
during coding and designing a report using LazReport for my application, where I add Memos to bands in runtime, I recognize that function TfrPage.RightMargin  return bad value. I created a page by the designer. In report xml file RightMargin = 36, but  TfrPage.RightMargin return 720.

I think the code from LR_Class.pas file line 7716 is wrong.
Code: Pascal  [Select][+][-]
  1. function TfrPage.RightMargin: Integer;
  2. begin
  3.   with PrnInfo do
  4.   begin
  5.     if UseMargins then
  6.     begin
  7.       if Margins.Right = 0 then
  8.         Result := Ofx + Pw
  9.       else
  10.         Result := Pgw - Margins.Right;
  11.     end
  12.     else Result := Pgw;
  13.   end;
  14. end;                  
  15.  

Same sutiation is with the function TfrPage.BottomMargin.

I think there are two buggy functions .

TinyPortal © 2005-2018