procedure SetOrient(x,i:Integer;bBands:TQRBand);
//(x,i:Integer;bBands:TQRBand);这里定义了有什么用的下面写代码的时候有什么用var
  DSet:TDataSet;
  aReport:TQuickRep;
//这里定义了两个变量有什么用的.下面写代码有什么用
begin
  aReport:=TQuickRep(bBands.Parent);
  DSet:=aReport.DataSet;
  if((x+Dset.Fields[i].DisplayWidth)>bBands.Size.Width) and
    (aReport.Page.Orientation = poPortrait) then
       aReport.Page.Orientation := poLandscape;
end;