ChildRead (child record read)

Top  Previous  Next

 

 

ChildRead

BYTE

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