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

TppReport - ppReportPreviewFormClose question

edited November 2006 in General
Hi all,

After opening a Report a PreviewForm is created and the event
ppReportPreviewCreate is called, but when I close the PreviewForm using the
close button
I expacted that the event ppReportPreviewClose would be called but it
doesn't. I need this event to be called so I can reset some variables.

What am I doing wrong?

Regards,

Ferdy van Schaik
Meurs Software Nederland.

Comments

  • edited November 2006
    Hi Ferdy,

    Which version of ReportBuilder/Delphi are you using. In my quick testing
    with RB 10.04 and Delphi 7, the OnPreviewFormCreate and OnPreviewFormClose
    fired as expected. I used the following code to make the test.

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ppReport1.Print;
    end;

    procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
    begin
    ShowMessage('Create');
    end;

    procedure TForm1.ppReport1PreviewFormClose(Sender: TObject);
    begin
    ShowMessage('Close');
    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2006
    Hi Nico,

    I'am using RB 9.02 and Delphi7

    Regards,

    Ferdy van Schaik
    Meurs Software Nederland.

  • edited November 2006
    Hi Ferdy,

    In my testing with the code I posted below, Delphi 7 and RB 9.03, everything
    worked correctly. Please upgrade to RB 9.03 and re-test your application.
    For upgrade instructions, please contact info@digital-metaphors.com with
    your serial number and purchasing email address.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.