Lazarus

Programming => Packages and Libraries => LazReport => Topic started by: GaborBoros on September 22, 2017, 04:37:45 pm

Title: How to reset preview window to the default state?
Post by: GaborBoros on September 22, 2017, 04:37:45 pm
Hi All,

See the below code. When the preview window showed first set scale to 200%, close the preview, preview showed second time and scaled to 200%. Why? How to reset the preview to the original state? (Not just the scale, but everything.)

Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2.  
  3.  procedure Proc_Report;
  4.  var
  5.    Report:TfrReport;
  6.  
  7.  begin
  8.    Report:=TfrReport.Create(Self);
  9.    Report.Clear;
  10.    Report.PrintToDefault:=True;
  11.    Report.Pages.Add;
  12.    Report.ShowReport;
  13.    Report.Free;
  14.  end;
  15.  
  16. begin
  17.   Proc_Report;
  18.   Proc_Report;
  19. end;

Gabor
TinyPortal © 2005-2018