Read the details from the saved search and objects pushed into array .
var inventoryDetails= [{“itemInventory”:”101002010″,”lotNumber”:”A-1022-4559″,”invQuantity”:”4″},{“itemInventory”:”101002010″,”lotNumber”:”A-1022-4664″,”invQuantity”:”4″},{“itemInventory”:”101001075″,”lotNumber”:”A-1022-4562″,”invQuantity”:”5″}]
Render this array to the advanced pdf :
renderer.addCustomDataSource({
format: render.DataSource.OBJECT,
alias: “customdata”,
data: {
inventoryDetails: inventoryDetails
}
});
Display the details of Lot number and Quantity from the inventory details
<#list customdata.inventoryDetails as inventoryDetails>
<tr>
<#if item.item == inventoryDetails.itemInventory>
<td colspan="1"> </td>
<td colspan="1"> </td>
<td colspan="1">Lot No: ${inventoryDetails.lotNumber}(${inventoryDetails.invQuantity})</td>
<td colspan="1"> </td>
<td colspan="1"> </td>
<td colspan="1"> </td>
<td colspan="1"> </td>
<td colspan="1"> </td>
<td colspan="1"> </td>
</#if>
</tr>
</#list>