来自: sunday_zhao, 时间: 2004-12-11 9:31:54, ID: 2926970
可以用tfrxCrossObject控件。
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView(c);
Table1.First;
i := 0;
while not Table1.Eof do
begin
for j := 0 to Table1.Fields.Count - 1 do
Cross.AddValue(, [Table1.Fields[j].DisplayLabel], [Table1.Fields[j].AsString]);
Table1.Next;
Inc(i);
end;
end;