Third Level Traverse

Local RowSet &RS1,&RS2,&RS3;
Local Row    &Row1,&Row2,&Row3;
Local Field  &Fld1,&Fld2,&Fld3;
Local Number &i,&j,&k;



    &RS1 = GelLeve0()(1).GetRowSet(Scroll.FirstLevelRecordName);
   
      For &i = 1 to &RS1.ActiveRowCount
       
         &Fld1 = &RS1(&i).GetRecord(Record.FirstLevelRecordName).GetField(Field.FieldName).value;

             &RS2 = &RS1(&i).GetRow(&i).GetRowSet(Scroll.SecondLevelRecordName);

                 For &j = 1 to &RS2.ActiveRowCount
 
                       &Fld2 = &RS2()(&j).GetRecord(Record.SecondLevelRecordName).GetField(Field.SecondLevelFieldName).Valule;

                           &RS3 = &RS2(&J).GetRow(&j).GetRowSet(Scroll.ThidLevelRecordName);

                              For&k = 1 to &RS3.ActiveRowCount

                                     &Fld3 = &RS3(&k).GetRecord(Record.ThirdLevelRecordName).GetField(Field.FieldName).Value;

 
                              End-for;

                 End-for;

      End-for;

Comments

Popular posts from this blog

BI Publisher: If Condition with sub-string in rtf template