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

preview report

edited August 2002 in General
How can I preview a report with ppReport component with a maximized window?

When I use ppReport1.print the open window (preview) is always a normal
window

Comments

  • edited August 2002
    From the Tech Tips newsgroup:

    ------------------------------------------------
    Tech Tip: Controlling the Built-in Previewer
    ------------------------------------------------

    You can control the built-in preview form via the
    Report.OnPreviewFormCreate event.

    For example the following code sets the Print Preview form to
    maximized and sets the Viewer ZoomSetting to 100%:

    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.


    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.