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