FASTREPORT是否可以動態設定紙張大小呢? |
尚未結案
|
jch
中階會員 發表:111 回覆:224 積分:66 註冊:2003-12-01 發送簡訊給我 |
|
goat
高階會員 發表:53 回覆:130 積分:134 註冊:2002-06-03 發送簡訊給我 |
|
jch
中階會員 發表:111 回覆:224 積分:66 註冊:2003-12-01 發送簡訊給我 |
|
goat
高階會員 發表:53 回覆:130 積分:134 註冊:2002-06-03 發送簡訊給我 |
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 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |