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

FastReport 的 Script 中可以呼叫Delphi 的 ClientDataSet 嗎

答題得分者是:goat
eigaeiga
一般會員


發表:3
回覆:2
積分:1
註冊:2005-03-03

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-05-08 00:40:33 IP:140.109.xxx.xxx 未訂閱
FastReport 的 Script 中可以呼叫Delphi 的 ClientDataSet 嗎?, 因為我是用 SocketConnection ClientDataSet 寫Multi-Tier 的Client, 但現在的問題是報表中有一個欄位是依每筆資料再去執行SQL查出值來, 所以 FR 的Script 可以引用 Delphi 的物件嗎?
goat
高階會員


發表:53
回覆:130
積分:134
註冊:2002-06-03

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-05-09 09:21:27 IP:202.168.xxx.xxx 未訂閱
引言: 所以 FR 的Script 可以引用 Delphi 的物件嗎?
FastScript Programmer's manual Adding an object to the script To add an object to a script, call the TfsScript.AddObject method. The first parameter is the name of the object, the second one is the object itself.
fsScript1.AddObject('Button1', Button1);
If object has an unregistered type, you have to register it before calling AddObject:
fsScript1.AddClass(TForm1, 'TForm');
fsScript1.AddObject('Form1', Form1);
You can also use fsGlobalUnit.AddForm method to add a form or datamodule with all its child components:
fsGlobalUnit.AddForm(Form1);
In this case you don't need to register the form class by AddClass method. Now you can access a form element in the script:
Form1.Button1.Caption := '...'
系統時間:2024-05-02 9:11:18
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!