Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Sizing the Standard Preview

edited October 2001 in General
I just want to be able to make the standard preview fit nicely on my users'
screens.
Unfortunately the PreviewForm doesn't exist before I start printing (Device
= dtScreen; Print) and the OnPreviewFormCreate event doesn't seem to get
called.

Is there a way round this?

Ian Butterworth

Comments

  • edited October 2001
    There is an article in the Techtips newsgroup in the Templates thread which
    describes lost event handlers. You'll need to reassign the
    OnPreviewFormCreate event handler after the template is loaded.

    procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
    begin
    ppReport1.PreviewForm.WindowState := wsMaximized;
    TppViewer(ppReport1.PreviewForm.Viewer).ZoomSetting := zs100Percent;
    end;

    Note: You will need to add ppViewr to the uses clause of your unit,
    so that the ZoomSetting enumerated type is recognized by the
    compiler.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited October 2001
    Fixed it thanks....
This discussion has been closed.