Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

showing collection within collection using excel template  RSS feed

 
firoza limbada
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using POI and creating a template for a report. the report is generated perfectly when I only have 1 level of collection i.e. a group of sales areas within a province.

I now need to drill down to a further level and have a collection of provinces...and within each province a collection of areas. eg. Prov 1 , with Area 11 , list of details for area 11, with Area 12 , list of details for area 12, Prov 2, with Area 21 , list of details for area 21, with Area 22 , list of details for area 22 and so forth

What I am getting is Prov 1 , Area 11, area 12, list of details for area 11 and 12, prov 1 , area 21, area 22 and so forth

I tried adding a further grouping
//:4
to the sub level
${ProvList.sales.salesArea}
but then the report is 'missing' a whole lot of provinces.

Is there another way to do the sub-grouping usign a template or is the only way to create each cell individually ?

the template looks as follows:

Age Analysis Report

${ProvList.province}//:7

${ProvList.sales.salesArea}
C-Code Planner Name Date Ended Current ${ProvVO.H1} ${ProvVO.H2} ${ProvVO.H3} ${ProvVO.H4} Total
${ProvList.sales.consultants.plannerCode} ${ProvList.sales.consultants.plannerFullName} ${ProvList.sales.consultants.dateEnded} ${ProvList.sales.consultants.current} ${ProvList.sales.consultants.thirtyDays} ${ProvList.sales.consultants.sixtyDays} ${ProvList.sales.consultants.ninetyDays} ${ProvList.sales.consultants.onetwentyDays} ${ProvList.sales.consultants.total}

Planner Total ${ProvList.sales.currentTotal} ${ProvList.sales.H1total} ${ProvList.sales.H2total} ${ProvList.sales.H3total} ${ProvList.sales.H4total} ${ProvList.sales.total}
//:7



Grand Total ${ProvVO.totalCurrent} ${ProvVO.totalH1} ${ProvVO.totalH2} ${ProvVO.totalH3} ${ProvVO.totalH4} ${ProvVO.total}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!