If we need the grouping, it is always advisable to generate the XML as per the required hierarchy. This makes the RTF design simple and perform better. But there are situation when we do not have control over XML structure and need to work on flat XML. Lets see how we can create multiple nested grouping in RTF template.
I am using following simple flat XML which is generated using scott.emp and scott.dept table.
Lets first design the simple table with default group
It generates simple listing report.
Lest add a group based on Depno. This is achieved by adding following loop
<?for-each-group:ROW;./DEPTNO?> --- <?end for-each?> and iterate the detail record within the current group.