<@U76K4ER46> this is the basic idea (untested pseu...
# advancedpdf
m
@sowmya this is the basic idea (untested pseudo code)
s
thank you @michoel, super helpful! its sorting my items correctly now, but still figuring out why the item level subtotal is not showing up
late in the day for me, i'm probably missing something basic here. but here's what i got to based on your pseudo code
Copy code
<!-- start items -->
<#list record.item?sort_by('custcol_cseg1') as item>
  <#assign itemTotal = 0>
  <#assign lastGroup = "">
  <#if lastGroup != "" && lastGroup != item.custco_cseg1>
  	<tr>
     <td align="right" colspan="31">${itemTotal}</td>
    </tr>
    <#assign itemTotal = 0>
    <#assign lastGroup = item.custcol_cseg1>
  </#if>
	<tr>
	<td colspan="10" line-height="150%">${item.custcol_cseg1}</td>
	<td colspan="10"><span class="itemname">${item.item}</span><br />${item.description}</td>
	<td colspan="3">${item.quantity}</td>
	<td align="right" colspan="4">${item.rate}</td>
	<td align="right" colspan="4">${item.amount}</td>
	</tr>
    <#assign itemTotal = itemTotal + item.amount>
</#list><!-- end items --></table>
m
I am on mobile but the first two `assign`s need to be outside the
list