在UI中調用套打

在UI的actionPrint_actionPerformed中,創建一個KDNoteHelper對象,如下:
com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp
= new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
然後,調用print方法,即可打印
appHlp.print(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
其中,getTDFileName(),需要重寫,提供模板打印的路徑,data爲打印數據提供者類
getTDFileName()一般實現如下:
    protected String getTDFileName() {
     return "/bim/fdc/contract/ContractBill";//在套打管理器中定義的模板路徑
 }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章