Fastreport的排列問題 |
答題得分者是:P.D.
|
irvinehing
初階會員 發表:77 回覆:79 積分:31 註冊:2003-11-12 發送簡訊給我 |
|
kevin2004
資深會員 發表:18 回覆:463 積分:416 註冊:2005-05-29 發送簡訊給我 |
每頁小記是將Count/Sum放在ColumnFooter,總記是要將Count/Sum放在MasterFooter。
不過 MasterFooter會先ColumnFooter被處理,即在最後一頁會先總記再小計。這樣當然 不行。 須在MasterFooter.BeforePrint中加以下類似碼: if FinalPass then begin if InsertBlankLine then begin while FreeSpace > ( ColumnFooter1.Height MasterFooter1.Height MasterFooter1.Height ChildBlank.Height ChildDuty.Height ) do begin ShowBand(ChildBlank); end ; end ; ShowBand(ColumnFooter1); ColumnFooter1.Visible:=False; end ; 以上碼對FR2.5X可用
------
Kevin |
P.D.
版主 發表:603 回覆:4038 積分:3874 註冊:2006-10-31 發送簡訊給我 |
我提供自己常用的方法,比較土法,但使用上比較明白易懂,只要你對FR熟悉的話(以下是2.5x)
設置 MasterData Band (選擇 Child1 Band) Child1 Band (屬性 Visilbe:= False) PageFooter Band (選擇 Child2 Band) Child2 Band (屬性 Visible:= False) ColumnFooter Band 或 Report Footer Band (擇一) Data Dictionary 增加兩組變數 pagetot (小計) sumtot(總計) 請在 Child1 Band的 BeforePrint 內寫類似的程式碼 pagetot:= pagetot mydata; (mydata 是你的數值資料) sumtot:= sumtot mydata; 請在 Child2 Band 的 BeforePrint 內寫 pagetot:= 0; 請在 PageFoot Band 置入 pagetot 的 TfrMemoView, 顯示 pagetot 請在 ColumnFooter 置入 sumtot 的 TfrMemoView, 顯示 sumtot 也可以用 ReportFooter 取代,這都是會在後一頁動作 Child1, Child2 的目的是模擬 MasterData 及 PageFooter 的 afterPrint (因為 Fr2.5 沒有 AflterPrint 事件) 大致重點是這樣的啦,其他靠自己來做吧! |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |