0

I'm creating an Advanced PDF/HTML template using NetSuite that is essentially a list of items that spans multiple pages.

The problem I have is that the table column headings only show on the first page.

I would like the table column headings to display on each page where the table spans.

I am stuck and not sure what I need to do.

Any guidance would be much appreciated.

Thanks

Ryan
  • 1
  • 3

3 Answers3

1

You can just put your header in <thead>...</thead> and the BFO engine will repeat the header on each page that the table wraps to. Same with <tfoot>...</tfoot>.

bknights
  • 14,408
  • 2
  • 18
  • 31
  • Code Description <#if lines.units@label?has_content> ${lines.units@label} #if> ${lines.rate@label} ${lines.rate2@label} ${lines.rate3@label} ${lines.rate4@label} R.R.P VAT Bar Code – Ryan Mar 14 '20 at 10:34
  • This does not work as expected. I have the same issue, and followed the BFO docs to the letter - the header does not repeat on every page. – Suite Resources Feb 04 '21 at 15:43
  • 2
    If you're looping through a list, the and should be OUTSIDE the list. Then, it works as expected.
    – Suite Resources Feb 04 '21 at 16:59
0

Turned out that the code was correct but there was a defect with the Price List Advanced PDF/HTML template. Still being investigated by NetSuite but glad I wasn't missing something in the code itself.

Ryan
  • 1
  • 3
0

same issue and I have a thead...

        <table class="item-table-orca" cellmargin="0px" style="margin-top: 10px;width:100%;" direction="${direction}" lang="${pdfLang}">
        <#list record.item as item>
            <#assign itemUnit = customUnitExpr>
            <#if item.units?has_content && UNIT_NAMES[item.units]??>
                <#assign itemUnit = UNIT_NAMES[item.units][pdfLang]>
            </#if>
            <#if !item.quantity?? || !item.quantity?has_content>
                <#assign itemUnit = "">
            </#if>

            <#if item_index==0>
                <thead>
                    <tr>
                        <th align="center" colspan="2">#</th>
                        <th align="${align}" colspan="8">
                            <#if pdfLang == 'en'> Activity <#else> פעילות </#if>
                        </th>
                        <th align="center" colspan="4">${getTranslatedLabel("item.custcol_rr_start_date", item.custcol_rr_start_date)}</th>
                        <th align="center" colspan="4">${getTranslatedLabel("item.custcol_rr_end_date", item.custcol_rr_end_date)}</th>
                        <th align="center" colspan="4">${getTranslatedLabel("item.quantity", item.quantity@label)}</th>
                        <th align="${oposAlign}" colspan="5">${getTranslatedLabel("item.amount", item.amount@label)}</th>
                    </tr>
                </thead>
            </#if>

            <tr>
                <td valign="middle" align="center" colspan="2"><p> ${item_index + 1} </p></td>
                <td valign="middle" align="${align}" colspan="8">${item.item}</td>
                <td valign="middle" align="center" colspan="4"><#if item.custcol_rr_start_date?has_content>${item.custcol_rr_start_date?date?string(dateFormat)}</#if></td>
                <td valign="middle" align="center" colspan="4"><#if item.custcol_rr_end_date?has_content>${item.custcol_rr_end_date?date?string(dateFormat)}</#if></td>
                <td valign="middle" align="center" colspan="4"><#if hasPrintData && printData.soLineData??> ${printData.soLineData[item_index?string].soQty} <#else> ${item.quantity} </#if></td>
                <td valign="middle" align="${oposAlign}" colspan="5">${curr_symbol}${item.amount?string(currFormat)}</td>
            </tr>
        </#list>    
    </table>
Nadav Julius
  • 301
  • 2
  • 16