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.

Comments

  • gpigpi
    edited 4:42AM
    wrote:
    but more likely that I'm not setting the Cross View up correctly.
    Try to analyze Sender.Name in TfrxReport.OnBeforePrint event
  • edited 4:42AM
    Hi

    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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.