LODOP控件中ADD_PRINT_TABLE自動(dòng)統(tǒng)計(jì)并生成帶有合并列的指定的列數(shù)
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
以前的博文,LODOP統(tǒng)計(jì)table自動(dòng)分頁后的每頁的某列合計(jì)值 還是用之前博文的表格,做了點(diǎn)修改,新表格是帶合并列的,把表格假設(shè)為100列,分給一些單元格。 測(cè)試代碼: <script language="javascript" src="LodopFuncs.js"></script> </head> <body> <div id="d1"> <table border=1 style="border-collapse:collapse;" > <thead> <tr> <td colspan="20">名稱</td> <td colspan="20">數(shù)量</td> <td colspan="60">單個(gè)金額本頁合計(jì)</td> </tr> </thead> <tr> <td colspan="20">A類</td> <td colspan="20">1</td> <td colspan="60">30</td> </tr> <tr> <td colspan="20">B類</td> <td colspan="20">5</td> <td colspan="60">34</td> </tr> <tr> <td colspan="20">C類</td> <td colspan="20">2</td> <td colspan="60">443</td> </tr> <tfoot> <tr> <td colspan="20">合計(jì)</td> <td colspan="20" tindex="21" tdata="SubSum">#####</td> <td colspan="10" >單頁金額總計(jì)</td> <td colspan="20" tindex="41" tdata="SubSum">####</td> <td colspan="10">單頁金額總計(jì)的大寫</td> <td colspan="20" tindex="41" tdata="SubSum" format="UpperMoney">################</td> </tr> </tfoot> </table> <br> </div> <a href="javascript:prn1_preview()">預(yù)覽表格</a><br> <script language="javascript" type="text/javascript"> var LODOP; //聲明為全局變量 function prn1_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.ADD_PRINT_TABLE(0,0,"100%",60,document.getElementById("d1").innerHTML); //打印項(xiàng)高度較小,60,導(dǎo)致超文本自動(dòng)分頁 //LODOP.PRINT_DESIGN(); LODOP.PREVIEW(); }; </script> </body> 圖示: 該文章在 2023/9/27 23:37:13 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |