線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1234
推到 Plurk!
推到 Facebook!

FR3中的变量创建和释放问题

 
ntjrr
高階會員


發表:240
回覆:312
積分:110
註冊:2005-04-24

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-03-25 17:59:18 IP:222.184.xxx.xxx 訂閱
var
mymemo:tfrxmemoview;
begin
mymemo := TfrxMemoView.Create(frxReport2.pages[i]);
mymemo.left:=...........
.......................
请问到最后是否需要加上mymemo.free ?
------
我的编程起步于ktop,我将永远支持ktop
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-03-26 14:06:08 IP:59.124.xxx.xxx 未訂閱
以下是截取自FastReport 的 UserManual(注意紅色部份):

5.18 Creation of objects in the script
One can add new objects into a report by using the script. Let us demonstrate with
a simple example, how it is performed. Create a blank report, and then write in the main
script’s procedure:

var
Band: TfrxReportTitle;
Memo: TfrxMemoView;
begin
Band := TfrxReportTitle.Create(Page1);
Band.Height := 20;
Memo := TfrxMemoView.Create(Band);
Memo.SetBounds(10, 0, 100, 20);
Memo.Text := 'This memo is created in code';
end.

Note, that we never destroy the created FastReport objects in these examples. It is
not required, since FastReport objects are automatically destroyed after the report is
completed.
系統時間:2024-05-19 16:22:07
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!