Additional control of Preview Form

edited March 2016 in General
Environment: Delphi 10 Seattle, RBE 17.01-b65

Just curious if there's any reasonably simple way of controlling
position of the preview form beyond setting its height and width. I'd
like to be able to position it at a particular location on the screen,
and have tried doing so in several different events, but evidently, RB
insists on opening the form window at screen center.

Thanks for any suggestions.


  • edited March 2016
    Hi Howard,

    Use the Report.OnPreviewFormCreate event to change the TPosition and
    location of the preview form using the Report.PreviewForm property.

    For instance...

    procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
    ppReport1.PreviewForm.Position := poDesigned;
    ppReport1.PreviewForm.Left := 0;


    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited March 2016
    Thanks, Nico,

    That was a "DUH!" moment. I didn't even think of the Position property
    for the preview form. Say what?


This discussion has been closed.