Navigation: ABC Library Reference > ProcessClass > ProcessClass Methods >====== TakeRecord (process each record read) ====== | |
TakeRecord, VIRTUAL, PROC
The TakeRecord method is a virtual placeholder to process each record in the result set. It returns a value indicating whether processing should continue or should stop. TakeRecord returns Level:Benign to indicate processing should continue normally; it returns Level:Notify to indicate processing is completed and should stop. The user can also force the method to return Level:Fatal, which will stop the process and close the active window.
Member of: ProcessClass
Implementation:
The ProcessClass.TakeRecord method is called to process each record. For a report procedure, the TakeRecord method typically implements any DETAIL specific filters and PRINTs the unfiltered DETAILs for the ReportManager. For a process procedure, the TakeRecord method typically implements any needed record action for the Process.
The difference between using the ProcessClass.TakeRecord method in a report procedure compared with a process procedure is that the report has a PRINT call in the method.
Any activity related to records processed needs to be done using this method.
Return Data Type: BYTE
Examples:
!In a Report Procedure:
ThisReport.TakeRecord PROCEDURE
ReturnValue BYTE,AUTO
SkipDetails BYTE
CODE
! Activity for each processed record (PRINT)
! Parent Call
ReturnValue = PARENT.TakeRecord()
PRINT(RPT:detail)
RETURN ReturnValue
!In a Process Procedure:
ThisProcess.TakeRecord PROCEDURE
ReturnValue BYTE,AUTO
CODE
! Activity for each processed record
! Parent Call
ReturnValue = PARENT.TakeRecord()
!Execute any record work needed
RETURN ReturnValue