HTML Table 当我尝试打印多行时 NetSuite 崩溃(高级 PDF)

HTML Table crashing NetSuite when I try to print multiple rows (Advanced PDF)

我正在尝试使用高级 PDF 功能的 HTML 部分在 NetSuite 中打印支票的详细信息。

我正在使用 HTML 打印 table,其中第一行是 header,其余行是我想要显示的数据。支票包含多个账单,我想显示这些多个账单的详细信息。

我使用的代码如下。我打印 header 行,然后尝试打印详细信息行。

我面临的问题:我可以很好地打印 1 行,但是当我尝试打印多行时,NetSuite 崩溃并给我以下错误消息:“发生意外错误. 请单击此处通知支持并提供您的联系信息。"

<#if check.apply?has_content><#list check.apply as apply>
<table style="position: absolute;overflow: hidden;left: 36pt;top: 15pt;width: 436pt;border-collapse: collapse;border: 2px solid black;">
    <thead>
        <tr>
            <th bgcolor="#000000"><font color="white">Date</font></th>
            <th bgcolor="#000000"><font color="white">Description</font></th>
            <th bgcolor="#000000"><font color="white">Orig. Amt.</font></th>
            <th bgcolor="#000000"><font color="white">Amt. Due</font></th>
            <th bgcolor="#000000"><font color="white">Discount</font></th>
            <th bgcolor="#000000"><font color="white">Amount</font></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>${apply.applydate}</td>
            <td>${apply.refnum}</td>
            <td>${apply.total}</td>
            <td>${apply.due}</td>
            <td>${apply.disc}</td>
            <td>${apply.amount}</td>
        </tr>
    </tbody>
</#list></table>
</#if>

我认为这个“<#list check.apply as apply>”应该放在“</thead>”之后,因为您只想创建 table header一次。像这样

<#if check.apply?has_content>
<table style="position: absolute;overflow: hidden;left: 36pt;top: 15pt;width: 436pt;border-collapse: collapse;border: 2px solid black;">
    <thead>
        <tr>
            <th bgcolor="#000000"><font color="white">Date</font></th>
            <th bgcolor="#000000"><font color="white">Description</font></th>
            <th bgcolor="#000000"><font color="white">Orig. Amt.</font></th>
            <th bgcolor="#000000"><font color="white">Amt. Due</font></th>
            <th bgcolor="#000000"><font color="white">Discount</font></th>
            <th bgcolor="#000000"><font color="white">Amount</font></th>
        </tr>
    </thead>
    <tbody>
<#list check.apply as apply>
        <tr>
            <td>${apply.applydate}</td>
            <td>${apply.refnum}</td>
            <td>${apply.total}</td>
            <td>${apply.due}</td>
            <td>${apply.disc}</td>
            <td>${apply.amount}</td>
        </tr>
</#list>
    </tbody>
</table>
</#if>