Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Coldfusion cfdocument分页符问题_Coldfusion_Cfdocument - Fatal编程技术网

Coldfusion cfdocument分页符问题

Coldfusion cfdocument分页符问题,coldfusion,cfdocument,Coldfusion,Cfdocument,我计划在记录编号达到指定编号(NumberDown)后使用分页符。但是,上面的代码将打印几页,然后在最后一页打印记录。 到底有没有办法解决这个问题,或者用另一种方法强制分页符 注:上述代码在一个表中 我认为这应该行得通。也不适合我。然而,“标题”也可以实现类似的效果: <cfif currentrow mod #Arguments.numbersDown# is 0> <cfdocumentitem type="pagebreak"/> </cfif>

我计划在记录编号达到指定编号(NumberDown)后使用分页符。但是,上面的代码将打印几页,然后在最后一页打印记录。 到底有没有办法解决这个问题,或者用另一种方法强制分页符


注:上述代码在一个表中

我认为这应该行得通。也不适合我。然而,“标题”也可以实现类似的效果:

<cfif currentrow mod #Arguments.numbersDown# is 0>
 <cfdocumentitem type="pagebreak"/>
</cfif>

账户
基金
平衡
#日期格式(rc.QPaymentHistoryForm10A.付款日期,“mm/dd/yyyy”)#
#local.qpform10a.VAL1#
#local.qpform10a.VAL2#
#local.qpform10a.VAL3#

请用一个小的、自成一体的示例来演示您所描述的问题。信息很少:
 <cfdocument format="PDF" filename="#local.sTargetPDFName#" overwrite="yes" orientation="portrait"  marginright=".2" marginleft=".2" marginbottom=".2" margintop=".2" localURL='Yes'>
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
            <cfset   dPerPage=local.qPHForm10A.recordCount/2 />
            <cfset sRow=1 />    
            <cfloop index="local.nowIndx" from="1" to="#dPerPage#">
                <cfset eRow=sRow +2 />
                   <tr>
                     <th align="center" bgcolor="##efefef" class="noBorder">Account</th>
                     <th align="center" bgcolor="##efefef" class="noBorder">Funds</th>
                     <th align="center" bgcolor="##efefef" class="noBorder">Balance</th>
                   </tr>
                   <cfloop query="local.qPHForm10A" startrow="#sRow#" endrow="#eRow#">

                   <tr>
                     <td class="noBorder noPadding">
                        <table cellpadding="0" cellspacing="0" border="0" class="borderList" width="100%">
                          <tr>
                            <td class="noleftBorder">#DateFormat(rc.qPayementHistoryForm10A.PAYMENT_DATE,"mm/dd/yyyy")#</td>
                            <td>#local.qPHForm10A.VAL1#</td>
                            <td>#local.qPHForm10A.VAL2#</td>
                            <td>#local.qPHForm10A.VAL3#</td>
                          </tr>
                       </table>
                     </td>
                    </tr>
                 </cfloop>
                 <cfset sRow=sRow+2 />
                 <cfdocumentitem type="header"></cfdocumentitem>
                </cfloop>
            </table>
        </td>
    </tr>

</table>
</cfdocument>