首页  编辑  

报表的强制分页输出

Tags: /超级猛料/Report.报表、图表/Report报表/   Date Created:

]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` 先声明一个变量

var

 TempName : string;

调用报表预览

procedure TForm1.Button1Click(Sender: TObject);

begin

query1.Close;

query1.Open;

TempName := query1.fieldbyname('name').AsString;

QuickRep1.Preview;

end;

调用DetailBand的BeforePrint方法

procedure TForm1.DetailBand1BeforePrint(Sender: TQRCustomBand;

 var PrintBand: Boolean);

begin

if Query1.FieldByName('Name').AsString <>TempName then

 begin

 quickrep1.NewColumn;

 tempname := query1.fieldbyname('name').Asstring;

 end;

end;