全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:3437
推到 Plurk!
推到 Facebook!

FASTREPORT是否可以動態設定紙張大小呢?

尚未結案
jch
中階會員


發表:111
回覆:224
積分:66
註冊:2003-12-01

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-05-02 15:43:43 IP:163.17.xxx.xxx 未訂閱
如題,在FASTREPORT中是否能讓使用者在程式列印時改變紙張大小呢? ======================== 使用DELPHI7 MS SQL2000
goat
高階會員


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

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-05-03 08:44:10 IP:202.168.xxx.xxx 未訂閱
3.x的版本我測試過是OK的;資料筆數會隨著紙張設定調整。
jch
中階會員


發表:111
回覆:224
積分:66
註冊:2003-12-01

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-05-03 09:29:21 IP:163.17.xxx.xxx 未訂閱
您好,感謝您的回覆,小弟的意思是要動態的利用程式改變紙張大小,例如原來的報表設計為A4,若使用者要用80行的報表列印,是否可以利用程式將A4的尺寸改為80行的連續報表呢?謝謝! ======================== 使用DELPHI7 MS SQL2000
goat
高階會員


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

發送簡訊給我
#4 引用回覆 回覆 發表時間:2005-05-04 16:34:46 IP:202.168.xxx.xxx 未訂閱
FR 3.x Programmer's manual    Modifying report page’s properties  Sometimes it is necessary to modify report page settings (for example, to modify paper alignment or size) from a code. The TfrxReportPage class contains the following properties, defining the size of the page: 
propertyOrientation: TPrinterOrientation default poPortrait;     property PaperWidth: Extended;     property PaperHeight: Extended;     property PaperSize: Integer; 
The «PaperSize» property sets paper format. This is one of the standard values, defined in the Windows.pas (for example, DMPAPER_A4). If a value to this property is assigned, FastReport fills the «PaperWidth» and «PaperHeight» properties automatically (paper size in millimeters). Setting the DMPAPER_USER (or 256) value as a format, would mean that custom paper size is set. In this case, the «PaperWidth» and «PaperHeight» properties should be filled manually. The following example shows, how to modify parameters of the first page (it is assumed that we already have a report):
var       Page: TfrxReportPage;    { the first report’s page }    Page := TfrxReportPage(frxReport1.Pages[0]);    { modify the size }    Page.PaperSize := DMPAPER_A2;    { modify the paper orientation }    Page.Orientation := poLandscape;
 
Hope it will give you what you expect.
jch
中階會員


發表:111
回覆:224
積分:66
註冊:2003-12-01

發送簡訊給我
#5 引用回覆 回覆 發表時間:2005-05-05 16:08:26 IP:163.17.xxx.xxx 未訂閱
感謝goat的回覆,但小弟的版本是2.51的。 ======================== 使用DELPHI7 MS SQL2000
系統時間:2024-05-12 8:26:54
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!