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

請教自動換頁的問題!

尚未結案
polarbear0902
一般會員


發表:1
回覆:1
積分:0
註冊:2010-05-06

發送簡訊給我
#1 引用回覆 回覆 發表時間:2010-06-14 17:48:32 IP:220.133.xxx.xxx 訂閱
 小的在寫一個Printer的程式

我在QRBand (detial) 的欄位裡,加了數個QRMemo,對應於主視窗的StringGrid的數個column
用for迴圈一筆一筆的把StringGrid的Row Add過來

然後在BeforePrint的事件下,放入超過行數則NewPage

卻出現了 每一個QRMemo NewPage一次的怪現象

有沒有高手可以幫幫我的 @@"


[code cpp]

for(int i = 1 ; i < StringGridRecipe->RowCount ; i)
{
Form2->QRMemo1->Lines->Add(StringGridRecipe->Cells[0][i]);
Form2->QRMemo2->Lines->Add(StringGridRecipe->Cells[1][i]);
Form2->QRMemo3->Lines->Add(StringGridRecipe->Cells[2][i]);
Form2->QRMemo4->Lines->Add(StringGridRecipe->Cells[3][i]);
Form2->QRMemo5->Lines->Add(StringGridRecipe->Cells[4][i]);
Form2->QRMemo6->Lines->Add(StringGridRecipe->Cells[5][i]);
Form2->QRMemo7->Lines->Add(StringGridRecipe->Cells[6][i]);
Form2->QRMemo8->Lines->Add(StringGridRecipe->Cells[7][i]);
Form2->QRMemo9->Lines->Add(StringGridRecipe->Cells[8][i]);
}
Form2->QuickRep1->Preview();

[/code]
[code cpp]

void __fastcall TForm2::QRBand3BeforePrint(TQRCustomBand *Sender, bool &PrintBand)
{
if ((QuickRep1->Page->Length - QuickRep1->CurrentY) <
(QRBandDetial->Height QRBandSummary->Height))
{
QuickRep1->EndPage();
QuickRep1->NewPage();
}
}


[/code]

編輯記錄
polarbear0902 重新編輯於 2010-06-14 17:52:34, 註解 無‧
polarbear0902 重新編輯於 2010-06-14 17:56:11, 註解 無‧
polarbear0902 重新編輯於 2010-06-14 17:57:13, 註解 無‧
taishyang 重新編輯於 2010-06-14 18:24:38, 註解 無‧
polarbear0902
一般會員


發表:1
回覆:1
積分:0
註冊:2010-05-06

發送簡訊給我
#2 引用回覆 回覆 發表時間:2010-06-14 18:16:42 IP:220.133.xxx.xxx 訂閱
 抱歉, 問題要重問了
突然發現 不管有沒有下NewPage()
他都會這樣!?
系統時間:2024-05-17 11:51:12
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!