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

Add Events to a Run-Time Created Object

edited September 2005 in End User
I cant find how to Add events, for example a BeforePrint Event, to
Objects Created in Run-Time, like a TppDetailBand.

I Create the Report, Subreports, Pipelines, Groups, etc, in Run-Time by
code but i cant manage to add Events.

Thanks.

Load_Hi

--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited September 2005
    Hi Load_Hi,

    The Band.BeforePrint, Band.AfterPrint, Band.BeforeGenerate, and
    Band.AfterGenerate are all published properties of the TppBand class and are
    available at runtime.

    interface
    ...
    procedure myBeforePrintEvent(Sender: TObject);

    implememtation
    ...
    Band.BeforePrint := myBeforePrintEvent;
    ...

    procedure TForm.myBeforePrintEvent(Sender: TObject);
    begin
    //Event code here
    end;

    --
    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.