Descendant of TppDetailBand
Hi,
I created a descendant of the TppDetailBand class to override the
BeforeGenerate event, this worked fine until i installed (a trial version
of) RB10. The event doesn't fire anymore though the same events on the other
band types seem to work like they did before.
Since I cannot take a look at the code because of the trial I haven't got a
clue why it doesn't work anymore, I hope you can help me with this!
Thanks in advance,
Mark Wittens
Syntess Software
The Netherlands
I created a descendant of the TppDetailBand class to override the
BeforeGenerate event, this worked fine until i installed (a trial version
of) RB10. The event doesn't fire anymore though the same events on the other
band types seem to work like they did before.
Since I cannot take a look at the code because of the trial I haven't got a
clue why it doesn't work anymore, I hope you can help me with this!
Thanks in advance,
Mark Wittens
Syntess Software
The Netherlands
This discussion has been closed.
Comments
Which version of ReportBuilder are you upgrading from? For the most part
the band have not been drastically changed in recent versions of
ReportBuilder.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
In ReportBuilder 10.x, the TppBandEngine calls it's Generate routine which
in turn calls the AfterObjectGenerate routine near the end. This procedure
fires the TppBandEngine.AfterGenerateEvent event which is implemented in the
TppDetailBand.BandEngineAfterGenerateEvent routine inside the TppDetailBand
class. From here the TppBand.AfterGenerate event is fired if implemented.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
None of the events (BeforeGenerate, AfterGenerate, BeforePrint) are fired
for the detailband, the GetRank event is fired so I guess the band is
registered properly. I still don't understand why the events aren't
triggered? What are the conditions under which they will or will not fire?
Thanks,
Mark
I'm unsure exactly how these events were fired for RB 5.56 however I can
tell you how they are fired now.
Inside the TppDetailBand.Init routine, various events of the TppBandEngine
(BeforePrint, AfterPrint, BeforeGenerate, AfterGenerate) are assigned to
methods in the detailband class. These methods are:
BandEngineBeforePrint
BandEngineAfterPrint
BandEngineBeforeGenerate
BandEngineAfterGenerate
Inside the BandEngineAfterGenerate for instance, the DoAfterGenerate routine
is called which fires the AfterGenerate event if it is implemented. This is
all started when the TppBandEngine.Generate routine is called and it calls
the AfterObjectGenerate routine. My guess would be that in RB 5.56 the
DoAfterGenerate routine is called from a different place (i.e. not the
BandEngineAfterGenerate) in the TppDetailBand class. You would need to
implement these events of the TppBandEngine inside the Init routine of your
detail band descendent in order to successfully fire the AfterGenerate
event.
Your best option would be to go ahead and upgrade your version of
ReportBuilder and take a look at the TppDetailBand source. I imagine you
would find the problem in a matter of minutes. All of our products include
a 30 day money back guarantee if you for some reason would need to revert
back.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
the other event you mentioned. (DoBeforeGenerate instead of BeforeGenerate)
Thanks again for the great service!
Mark Wittens