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

BeforePrint event of the report of a subreport

edited December 2009 in General
Hi All,

I have attached a TppReport to a TppSubreport wich is contained in the Summary
band of the main report.
When i assign a procedure to the BeforePrint property of the TppReport it
doenst get executed when the supreport is eventually printed.

Am i doing something wrong or is this behaviour "by design" ?



greetings
Bas Schouten

Comments

  • edited December 2009
    Hi Bas,

    Events such as the BeforePrint and AfterPrint are not available for Child
    Reports. What exactly does this code do? Perhaps it can be moved to the
    BeforePrint of the main report?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2009
    Hello Nico,

    I solved it by setting the OnPrint event of the Subreport to the Onprint
    of the TppReport:

    if Assigned(FRuntimeReport.Parent) and (FRuntimeReport.Parent is TppSubReport)
    then
    TppSubreport(FRuntimeReport.Parent).OnPrint := OnReportBeforePrint;
This discussion has been closed.