TfrxCrossView
Hi all
Does any one know if it is possible to add data to the cells of a TfrxCross view in code, that is without using the:
procedure TForm.frxReportBeforePrint(Sender: TfrxReportComponent);
..event?
The report needs to be a bit more dynamic and I was hoping to be able to:
var
CrossView : TfrxCrossView;
ColumnHeader : TfrxCrossColumnHeader;
i, j : Integer;
begin
CrossView := TfrxCrossView.Create(APage);
CrossView.CreateUniqueName;
CrossView.Top := 0;
CrossView.Left := 0;
CrossView.Width := 400;
CrossView.Height := 400;
CrossView.ColumnLevels := 0;
CrossView.RowLevels := 1;
CrossView.CellLevels := 1;
CrossView.CellFunctions[0] := cfNone;
CrossView.ShowColumnHeader := true;
CrossView.ShowColumnTotal := false;
CrossView.ShowRowHeader := false;
CrossView.ShowRowTotal := false;
for i := 1 to 5 do
for j := 1 to 2 do
CrossView.AddValue(, [j], );
Perhaps this is not possible but more likely that I'm not setting the Cross View up correctly.
Any help much appreciated.
Does any one know if it is possible to add data to the cells of a TfrxCross view in code, that is without using the:
procedure TForm.frxReportBeforePrint(Sender: TfrxReportComponent);
..event?
The report needs to be a bit more dynamic and I was hoping to be able to:
var
CrossView : TfrxCrossView;
ColumnHeader : TfrxCrossColumnHeader;
i, j : Integer;
begin
CrossView := TfrxCrossView.Create(APage);
CrossView.CreateUniqueName;
CrossView.Top := 0;
CrossView.Left := 0;
CrossView.Width := 400;
CrossView.Height := 400;
CrossView.ColumnLevels := 0;
CrossView.RowLevels := 1;
CrossView.CellLevels := 1;
CrossView.CellFunctions[0] := cfNone;
CrossView.ShowColumnHeader := true;
CrossView.ShowColumnTotal := false;
CrossView.ShowRowHeader := false;
CrossView.ShowRowTotal := false;
for i := 1 to 5 do
for j := 1 to 2 do
CrossView.AddValue(, [j], );
Perhaps this is not possible but more likely that I'm not setting the Cross View up correctly.
Any help much appreciated.
Comments
Yes that seems to be the only way. Just a bit difficult for me as the report is being created and previewed dynamically. I can work around it though. Thanks for the response.
A