分组时,会要求输入分组项( condition)。用代码控制分组时,代表condition的属性时什么?

解决方案 »

  1.   

    sorry,问题没有解决。
    为何用代码创建 GroupHeader没有效果?编译时和运行时都没有错误,但是显示的结果和没有分组时一样的。procedure TForm1.PrintGroupHeader();
    var
      GroupBy: string;
      v: TfrView;
      b: TfrBandView;
      Page: TfrPage;
    begin
      Page := FfrReport.Pages[0];  b := TfrBandView.Create;
      b.SetBounds(0, 200, 0, 20);
      b.BandType := btGroupHeader;
      b.GroupCondition := '[ADOQuery1."GroupName"]' ;
      Page.Objects.Add(b);  v := TfrMemoView.Create;             // create memo
      v.SetBounds(11, 200, 50, 20);
      v.BandAlign := baWidth;
      v.Prop['Alignment'] := frtaLeft;
      v.Prop['FrameTyp'] := 0;
      v.Memo.Add( '[ADOQuery1."GroupName"]');
      Page.Objects.Add(v);
    end;
      

  2.   

    sorry,问题解决了。要先生成 MasterData,在生成 GroupHeader.