Freemarker code to display a table on the entire page even if the data size varies.

<table align="center" id="imagetable" style="width: 100%; height: 520px; table-layout: fixed; border: 1px solid black;">
<thead>
	<tr>
	<th align="left" colspan="2" style="font-size:10pt">Date</th>
	<th align="left" colspan="3" style="font-size:10pt">${record.lines.description@label}</th>
	<th align="left" colspan="2" style="font-size:10pt">Customer ID</th>
	<th align="left" colspan="2" style="font-size:10pt">PO Number NEW</th>
	<th align="left" colspan="2" style="font-size:10pt">SO Created From</th>
	<th align="left" colspan="2" style="font-size:10pt">${record.lines.charge@label}</th>
	<th align="left" colspan="2" style="font-size:10pt">${record.lines.payment@label}</th>
	<th align="left" colspan="2" style="font-size:10pt">${record.lines.balance@label}</th>
	</tr>
</thead>
<#list record.lines as line>
  <tr  height="20px">
	<td align="left" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.datecol}</p></td>
    <td align="left" class="imagetableodd" colspan="3"><p style="text-align: left;">${line.description}</p></td>
	<td align="left" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.custbody15}</p></td>
	<td align="left" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.custbody_cust_po_number}</p></td>
	<td align="left" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.custbody_scpq_wo_parent_created_clean}</p></td>
	<td align="right" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.charge}</p></td>
	<td align="right" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.payment}</p></td>
	<td align="right" class="imagetableodd" colspan="2"><p style="text-align: left;">${line.balance}</p></td>
	</tr>
	</#list>

  <tr>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="3">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
    <td style="border: .03px solid #000000;" colspan="2">&nbsp;</td>
  </tr>
  </table>

Leave a comment

Your email address will not be published. Required fields are marked *