If using global variables to accumulate counts to be shown in the Summary
band, in what event should they be initialized so that both Print and
Preview start with the proper values? Should this be Report.OnBeforePrint or
Report.OnStartFirstPass?
Regards,
Tom
Comments
Try using TppVariable components to accumulate totals. Variable components
contain the ability to save/restore their intermediate results as of the
end/begin of each page. The Variable OnCalc event is designed to be a good
place to perform calcs.
If you still feel that you need to use code based variables, try using the
Global OnCreate event to initialize variables. From the Calc tab select View
| Module.
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks for the information. Does a list exist anywhere that shows the events
and the order in which they fire?
Tom
Tom
Great, I was going to point you towards those demos.
The Global OnCreate/OnDestroy events fire slightly differently when a report
is previewed from the Designer's Preview tab versus when a report is printed
to the Preview Dialog. AutoSearch also works slightly differently in these
environments as well.
The RBuilder\Demos\Rap\CodeSite example contains a set of pass-thru
functions that enable you to use the CodeSite debugger with RAP. CodeSite is
available from Raize Software.
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com