User Tools

Site Tools


childread_child_record_read_.htm
Navigation:  ABC Library Reference > ProcessClass > ProcessClass Properties >====== ChildRead (child record read) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page
ChildRead BYTE

blk2blue.jpg

The ChildRead property returns the “instance count” of the ChildFileClass for the current process/report. For example, each time a new ChildFileClass is added to the process or report, a sequential instance number is allocated (starting from 1). The second instance will be 2 and so on.

ChildRead is incremented and decremented by the ProcessClass.Next method, and initialized by the ProcessClass.Reset method.

Example:

ThisWindow.Init PROCEDURE

 CODE

 …..

 CF5:Level = ThisReport.AddItem(CF5:ViewManager,1)   ! Returns 1

 CF9:Level = ThisReport.AddItem(CF9:ViewManager,2)   ! Returns 2

ThisReport.TakeRecord PROCEDURE

 CODE

 CASE SELF.ChildRead

 OF 0

   PRINT(RPT:Detail)

 OF CF5:Level

   ! Do something with this child record of the first ChildFileclass

   PRINT(RPT:Detail2)

 OF CF9:Level

   ! Do something with this child record of the second ChildFileclass

   PRINT(RPT:Detail3)

 END

See Also:     AddItem

childread_child_record_read_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1