|
음..폼을 그대로 캡쳐해서 프린트하셨군요.
그러면 당연히 보이는 부분만 나오겠죠.
폼을 새로 하나 만들고 거기에
TQuickRep, TQRBand, TQRLabel(출력하려는 데이터수만큼)을 적당히 배치하세요
멤버변수로 int CurrentItem 두고..
TQRBand의 BandType을 rbDetail로 설정하시고
TQuickRep의 OnNeedData에서
if(CurrentItem < Form1->StringGrid1->RowCount)
{
QRLabel1->Caption = Form1->StringGrid1->Cells[CurrentItem][0];
QRLabel2->Caption = Form1->StringGrid1->Cells[CurrentItem][1];
QRLabel3->Caption = Form1->StringGrid1->Cells[CurrentItem][2];
}
CurrentItem++;
MoreData = CurrentItem <= fmTransLog->slname->Count;
이런 식으로 해서 QuickReport에 데이터를 추가해 줍니다.
TQuickRep의 BeforePrint 에서
CurrentItem = 0;
PrintReport = Form1->StringGrid1->RowCount > 0;
이렇게 하면 모든 데이터를 출력할 수 있습니다.
|