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

RB Event Audit omponent - any interest?

edited March 2004 in General
I've converted a unit I originally created for debugging reports into a
component. I'd like to see if there is any interest in the RB community for
making it available. If there is, then I would make the effort to port it
to the latest versions of Delphi and RB (it currently works with D5 and
RB6.03). Below is a description of its capabilities and I would like some
feedback on what you think of the features. You can send questions and
comments to chuckvanacker@yahoo.com.

cvRBEventAudit
-----------------------

cvRBEventAudit is a component that creates a text file containing a detailed
log of events for a report. At a minimum, the 'Report' and 'Active'
properties must be set. With just these settings, a report will be
generated to the same directory as the executable that contains detailed
information for the events that were fired for the report for all pages.
The list of properties are:

Active True or False, Default = False
AuditBeginPage Default = 1
AuditEndPage Default = 99999999
AuditFileName Detault = 'ReportEventAudit.txt'
AuditFilePath Default = ''
LogBands True or False, Default = True
LogDataPipelines True or False, Default = True
LogDBImage True or False, Default = True
LogDBMemo True or False, Default = True
LogDBRichText True or False, Default = True
LogDBText True or False, Default = True (Incl. DBCalc)
LogGraphic True or False, Default = True
LogImage True or False, Default = True
LogLabel True or False, Default = True
LogMemo True or False, Default = True
LogRegion True or False, Default = True
LogReport True or False, Default = True (incl. SubReports)
LogRichText True or False, Default = True
LogVariables True or False, Default = True
Name Default = 'cvRBEventAudit1'
Report Default = ''

There is also a procedure available called 'AddToLog' that will allow you to
put your own string within the log at the point that it falls into the logic
flow to allow documenting data or areas of your code that may not be event
related.

Components that are linked to data pipelines will report the pipeline and
datafield name as well as the value for that field at that time. Other
components like labels, variables, memos, etc, will also show their values.

Below is an example of the audit file output generated about the first page
from the RBDemo report sample #2:

plCustomer.OnFirst
ppOrderList.OnStartPage
plCustomer.OnTraversal
ppOrderList.ppOrderListHeaderBand1.BeforePrint
ppOrderList.ppOrderListHeaderBand1.BeforeGenerate
ppOrderList.ppOrderListHeaderBand1.ppOrderListLabel1.OnPrint *Value=Marine
Adventures & Sunken Treasures Co.
ppOrderList.ppOrderListHeaderBand1.ppOrderListLabel2.OnPrint *Value=Order
Summary
ppOrderList.ppOrderListHeaderBand1.ppOrderListShape1.OnPrint
ppOrderList.ppOrderListHeaderBand1.ppOrderListLabel3.OnPrint *Value=Customer

ppOrderList.ppOrderListHeaderBand1.ppOrderListLabel4.OnPrint *Value=Cust.
No.
ppOrderList.ppOrderListHeaderBand1.ppOrderListDBText1.OnPrint
~Pipeline=plCustomer @DataField= Company *Value=Kauai Dive Shoppe
ppOrderList.ppOrderListHeaderBand1.ppOrderListDBText2.OnPrint
~Pipeline=plOrder @DataField= CustNo *Value=1221
ppOrderList.ppOrderListHeaderBand1.AfterGenerate
ppOrderList.ppOrderListHeaderBand1.AfterPrint
ppOrderList.ppOrderListDetailBand1.BeforePrint
ppOrderList.ppOrderListDetailBand1.BeforeGenerate
plOrder.OnOpen
plOrder.OnFirst
ppChildReport1.OnStartFirstPass
ppChildReport1.OnStartPage
plOrder.OnTraversal
ppChildReport1.ppGroupHeaderBand1.BeforePrint
ppChildReport1.ppGroupHeaderBand1.BeforeGenerate
ppChildReport1.ppGroupHeaderBand1.ppOrderListShape2.OnPrint
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel5.OnPrint *Value=Date
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel6.OnPrint *Value=Number
ppChildReport1.ppGroupHeaderBand1.ppOrderListShape3.OnPrint
ppChildReport1.ppGroupHeaderBand1.ppOrderListShape4.OnPrint
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel7.OnPrint *Value=Order
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel8.OnPrint *Value=Date
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel9.OnPrint *Value=Ship
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel10.OnPrint *Value=Via
ppChildReport1.ppGroupHeaderBand1.ppOrderListShape5.OnPrint
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel11.OnPrint *Value=Payment
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel12.OnPrint *Value=Method
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel13.OnPrint *Value=Amount
ppChildReport1.ppGroupHeaderBand1.ppOrderListLabel15.OnPrint *Value=Sales
Rep
ppChildReport1.ppGroupHeaderBand1.AfterGenerate
ppChildReport1.ppGroupHeaderBand1.AfterPrint
ppChildReport1.ppDetailBand1.BeforePrint
ppChildReport1.ppDetailBand1.BeforeGenerate
ppChildReport1.ppDetailBand1.ppOrderListDBText3.OnPrint ~Pipeline=plOrder
@DataField= OrderNo *Value=1023
ppChildReport1.ppDetailBand1.ppOrderListDBText6.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=07/02/88
ppChildReport1.ppDetailBand1.ppOrderListDBText10.OnPrint
~Pipeline=plEmployee @DataField= FirstName *Value=Kim
ppChildReport1.ppDetailBand1.ppOrderListDBText4.OnPrint ~Pipeline=plOrder
@DataField= ShipVIA *Value=UPS
ppChildReport1.ppDetailBand1.ppOrderListDBText8.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=07/02/88
ppChildReport1.ppDetailBand1.ppOrderListDBText5.OnPrint ~Pipeline=plOrder
@DataField= PaymentMethod *Value=Check
ppChildReport1.ppDetailBand1.ppOrderListDBText7.OnPrint ~Pipeline=plOrder
@DataField= AmountPaid *Value=$4,674.00
ppChildReport1.ppDetailBand1.ppOrderListLine1.OnPrint
ppChildReport1.ppDetailBand1.ppOrderListLine2.OnPrint
ppChildReport1.ppDetailBand1.AfterGenerate
ppChildReport1.ppDetailBand1.AfterPrint
plOrder.OnNext
ppChildReport1.ppDetailBand1.BeforePrint
plOrder.OnTraversal
ppChildReport1.ppDetailBand1.BeforeGenerate
ppChildReport1.ppDetailBand1.ppOrderListDBText3.OnPrint ~Pipeline=plOrder
@DataField= OrderNo *Value=1076
ppChildReport1.ppDetailBand1.ppOrderListDBText6.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=04/26/89
ppChildReport1.ppDetailBand1.ppOrderListDBText10.OnPrint
~Pipeline=plEmployee @DataField= FirstName *Value=Phil
ppChildReport1.ppDetailBand1.ppOrderListDBText4.OnPrint ~Pipeline=plOrder
@DataField= ShipVIA *Value=UPS
ppChildReport1.ppDetailBand1.ppOrderListDBText8.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=04/26/89
ppChildReport1.ppDetailBand1.ppOrderListDBText5.OnPrint ~Pipeline=plOrder
@DataField= PaymentMethod *Value=Visa
ppChildReport1.ppDetailBand1.ppOrderListDBText7.OnPrint ~Pipeline=plOrder
@DataField= AmountPaid *Value=$17,781.00
ppChildReport1.ppDetailBand1.ppOrderListLine1.OnPrint
ppChildReport1.ppDetailBand1.ppOrderListLine2.OnPrint
ppChildReport1.ppDetailBand1.AfterGenerate
ppChildReport1.ppDetailBand1.AfterPrint
plOrder.OnNext
ppChildReport1.ppDetailBand1.BeforePrint
plOrder.OnTraversal
ppChildReport1.ppDetailBand1.BeforeGenerate
ppChildReport1.ppDetailBand1.ppOrderListDBText3.OnPrint ~Pipeline=plOrder
@DataField= OrderNo *Value=1123
ppChildReport1.ppDetailBand1.ppOrderListDBText6.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=08/24/93
ppChildReport1.ppDetailBand1.ppOrderListDBText10.OnPrint
~Pipeline=plEmployee @DataField= FirstName *Value=Roberto
ppChildReport1.ppDetailBand1.ppOrderListDBText4.OnPrint ~Pipeline=plOrder
@DataField= ShipVIA *Value=UPS
ppChildReport1.ppDetailBand1.ppOrderListDBText8.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=08/24/93
ppChildReport1.ppDetailBand1.ppOrderListDBText5.OnPrint ~Pipeline=plOrder
@DataField= PaymentMethod *Value=Check
ppChildReport1.ppDetailBand1.ppOrderListDBText7.OnPrint ~Pipeline=plOrder
@DataField= AmountPaid *Value=$13,945.00
ppChildReport1.ppDetailBand1.ppOrderListLine1.OnPrint
ppChildReport1.ppDetailBand1.ppOrderListLine2.OnPrint
ppChildReport1.ppDetailBand1.AfterGenerate
ppChildReport1.ppDetailBand1.AfterPrint
plOrder.OnNext
ppChildReport1.ppDetailBand1.BeforePrint
plOrder.OnTraversal
ppChildReport1.ppDetailBand1.BeforeGenerate
ppChildReport1.ppDetailBand1.ppOrderListDBText3.OnPrint ~Pipeline=plOrder
@DataField= OrderNo *Value=1169
ppChildReport1.ppDetailBand1.ppOrderListDBText6.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=07/06/94
ppChildReport1.ppDetailBand1.ppOrderListDBText10.OnPrint
~Pipeline=plEmployee @DataField= FirstName *Value=Terri
ppChildReport1.ppDetailBand1.ppOrderListDBText4.OnPrint ~Pipeline=plOrder
@DataField= ShipVIA *Value=UPS
ppChildReport1.ppDetailBand1.ppOrderListDBText8.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=07/06/94
ppChildReport1.ppDetailBand1.ppOrderListDBText5.OnPrint ~Pipeline=plOrder
@DataField= PaymentMethod *Value=Credit
ppChildReport1.ppDetailBand1.ppOrderListDBText7.OnPrint ~Pipeline=plOrder
@DataField= AmountPaid *Value=$9,471.95
ppChildReport1.ppDetailBand1.ppOrderListLine1.OnPrint
ppChildReport1.ppDetailBand1.ppOrderListLine2.OnPrint
ppChildReport1.ppDetailBand1.AfterGenerate
ppChildReport1.ppDetailBand1.AfterPrint
plOrder.OnNext
ppChildReport1.ppDetailBand1.BeforePrint
plOrder.OnTraversal
ppChildReport1.ppDetailBand1.BeforeGenerate
ppChildReport1.ppDetailBand1.ppOrderListDBText3.OnPrint ~Pipeline=plOrder
@DataField= OrderNo *Value=1176
ppChildReport1.ppDetailBand1.ppOrderListDBText6.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=07/26/94
ppChildReport1.ppDetailBand1.ppOrderListDBText10.OnPrint
~Pipeline=plEmployee @DataField= FirstName *Value=Carol
ppChildReport1.ppDetailBand1.ppOrderListDBText4.OnPrint ~Pipeline=plOrder
@DataField= ShipVIA *Value=UPS
ppChildReport1.ppDetailBand1.ppOrderListDBText8.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=07/26/94
ppChildReport1.ppDetailBand1.ppOrderListDBText5.OnPrint ~Pipeline=plOrder
@DataField= PaymentMethod *Value=Visa
ppChildReport1.ppDetailBand1.ppOrderListDBText7.OnPrint ~Pipeline=plOrder
@DataField= AmountPaid *Value=$4,178.85
ppChildReport1.ppDetailBand1.ppOrderListLine1.OnPrint
ppChildReport1.ppDetailBand1.ppOrderListLine2.OnPrint
ppChildReport1.ppDetailBand1.AfterGenerate
ppChildReport1.ppDetailBand1.AfterPrint
plOrder.OnNext
ppChildReport1.ppDetailBand1.BeforePrint
plOrder.OnTraversal
ppChildReport1.ppDetailBand1.BeforeGenerate
ppChildReport1.ppDetailBand1.ppOrderListDBText3.OnPrint ~Pipeline=plOrder
@DataField= OrderNo *Value=1269
ppChildReport1.ppDetailBand1.ppOrderListDBText6.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=12/16/94
ppChildReport1.ppDetailBand1.ppOrderListDBText10.OnPrint
~Pipeline=plEmployee @DataField= FirstName *Value=Ann
ppChildReport1.ppDetailBand1.ppOrderListDBText4.OnPrint ~Pipeline=plOrder
@DataField= ShipVIA *Value=UPS
ppChildReport1.ppDetailBand1.ppOrderListDBText8.OnPrint ~Pipeline=plOrder
@DataField= ShipDate *Value=12/16/94
ppChildReport1.ppDetailBand1.ppOrderListDBText5.OnPrint ~Pipeline=plOrder
@DataField= PaymentMethod *Value=Credit
ppChildReport1.ppDetailBand1.ppOrderListDBText7.OnPrint ~Pipeline=plOrder
@DataField= AmountPaid *Value=$1,400.00
ppChildReport1.ppDetailBand1.ppOrderListLine1.OnPrint
ppChildReport1.ppDetailBand1.ppOrderListLine2.OnPrint
ppChildReport1.ppDetailBand1.AfterGenerate
ppChildReport1.ppDetailBand1.AfterPrint
plOrder.OnNext
plOrder.OnLast
ppChildReport1.ppGroupFooterBand1.BeforePrint
ppChildReport1.ppGroupFooterBand1.BeforeGenerate
ppChildReport1.ppGroupFooterBand1.ppOrderListLine4.OnPrint
ppChildReport1.ppGroupFooterBand1.ppOrderListLine3.OnPrint
ppChildReport1.ppGroupFooterBand1.ppOrderListDBText9.OnPrint
~Pipeline=plCustomer @DataField= Company *Value=Kauai Dive Shoppe
ppChildReport1.ppGroupFooterBand1.ppOrderListLabel14.OnPrint *Value=Total
ppChildReport1.ppGroupFooterBand1.ppOrderListDBCalc1.OnPrint
~Pipeline=plOrder @DataField= AmountPaid *Value=$51,450.80
ppChildReport1.ppGroupFooterBand1.AfterGenerate
ppChildReport1.ppGroupFooterBand1.AfterPrint
ppChildReport1.OnEndPage
ppChildReport1.OnEndFirstPass
plOrder.OnFirst
ppOrderList.ppOrderListDetailBand1.AfterGenerate
ppOrderList.ppOrderListDetailBand1.AfterPrint
plCustomer.OnNext
ppOrderList.ppOrderListDetailBand1.BeforePrint
plCustomer.OnTraversal
ppOrderList.ppOrderListDetailBand1.BeforeGenerate
plOrder.OnLast
plOrder.OnOpen
plOrder.OnFirst
ppChildReport1.OnStartFirstPass
ppChildReport1.OnStartPage
plOrder.OnTraversal
ppChildReport1.OnEndPage
plOrder.OnFirst
ppOrderList.ppOrderListDetailBand1.AfterGenerate
ppOrderList.ppOrderListFooterBand1.BeforePrint
ppOrderList.ppOrderListFooterBand1.BeforeGenerate
ppOrderList.ppOrderListFooterBand1.ppOrderListCalc1.OnPrint *Value=3/22/2004
12:00:11 PM
ppOrderList.ppOrderListFooterBand1.ppOrderListCalc2.OnPrint *Value=3/22/2004
12:00:11 PM
ppOrderList.ppOrderListFooterBand1.ppOrderListCalc3.OnPrint *Value=Page 1 of
1
ppOrderList.ppOrderListFooterBand1.AfterGenerate
ppOrderList.ppOrderListFooterBand1.AfterPrint
ppOrderList.OnEndPage
plCustomer.OnGoToBookmark
plCustomer.OnTraversal
plCustomer.OnGoToBookmark
plCustomer.OnTraversal
ppOrderList.OnStartPage


Regards,
Chuck Van Acker
chuckvanacker@yahoo.com
This discussion has been closed.