用報表工具實現(xiàn)分組匯總之三
Posted on 2009-11-26 13:58 FineReport——報表技術(shù)領(lǐng)跑者 閱讀(131) 評論(0) 編輯 收藏 所屬分類: Java報表技術(shù)知識由finereport報表完成
分組匯總
下面我們來看一下上述報表的實現(xiàn)過程
1.連接數(shù)據(jù)庫frDemo
2.設(shè)計報表
2.1新建報表
2.2表樣設(shè)計
按照下圖設(shè)計好報表的基本框架
表樣設(shè)計
2.3新建一數(shù)據(jù)集名為emp_sql
SQL語句:select * from employee
2.4綁定數(shù)據(jù)列
綁定數(shù)據(jù)列
按照下列表格將數(shù)據(jù)集的字段拖入對應(yīng)單元格內(nèi),并作相應(yīng)的設(shè)置。
2.5匯總
如圖在D3,D4,D5,中都輸入”=sum(D2)”
數(shù)據(jù)匯總
3.保存預(yù)覽
保存為
%FineReport_HOME%/WebReport/WEB-INF/reportlets/com/doc/4.5.cpt
啟動服務(wù)器,在瀏覽器中輸入以下地址進(jìn)行瀏覽:
http://localhost:8079/WebReport/ReportServer?reportlet=/com/doc/4.5.cpt