水晶報表之匯總

1,添加公式字段 amount1 輸入以下代碼

whileprintingrecords;
global numberVar ptotal;
ptotal:=0;

2,添加公式字段amount2

whileprintingrecords;
global numberVar ptotal;
ptotal:={命令.ExpenditureAmount};//計算字段
ptotal := ptotal + ToNumber (ptotal) ;
3,添加公式字段amount3

whileprintingrecords;
global numberVar Eptotal;

最后將amount1放入頁面首,amount2放入頁細,amount3放入頁尾,隱藏amount1,amount2即可。

posted @ 2011-03-29 10:35  CarlyChen  阅读(274)  评论(0)    收藏  举报