Docx Formatter : Iterate over child band in docx template

I’ve a requirement in which I’ll have to create table by using ParentBand and Child Bands records together in output document(i.e docx).

Backend Code Sinept:
ReportBand records =“Students”).
query(“Students”, “return [\n”

  • " [‘name’:‘Alex’, ‘marks’ : 250],\n"
  • " [‘name’:‘Jimmy’, ‘marks’ : 230],\n"
  • " [‘name’:‘Penny’, ‘marks’ : 250]\n"
  • " ]", “groovy”)
    .child(new BandBuilder().name(“Books”).query(“Books”, “return [\n”
  • " [‘name’:‘Java Concurrency in practice’, ‘price’ : 15000],\n"
  • " [‘name’:‘Clear code’, ‘price’ : 13000],\n"
  • " [‘name’:‘Scala in action’, ‘price’ : 12000]\n"
  • " ]", “groovy”)

How to iterate child bands in docx template, I can’t find useful example on link.

Reference link for same issue

Let us know how we can fulfill the above requirement.