frxCrossView
BJL
Brussels, Belgium
FR3.04 and BCB6
As an example, I take the "PrintTable" demo which prints the table Customers.db using frxCrossView and filling it by code.
With Dimensions | Rows set to 0, there is no row header repeated.
If this value is set to 1, a row number is added and repeated on pages to the right.
How can I set the Cross object to recognize the first field (or the 2 first) to be the Row Header instead of getting a row number?
I have tried
for j := 0 to Table1.Fields.Count - 1 do
Cross.AddValue([Table1.Fields[0].AsString], [Table1.Fields[j].DisplayLabel], [Table1.Fields[j].AsString]);
Table1.Next;
and
Cross.RowLevels := 1;
but it does not work.
Thanks for helping.
BJL
As an example, I take the "PrintTable" demo which prints the table Customers.db using frxCrossView and filling it by code.
With Dimensions | Rows set to 0, there is no row header repeated.
If this value is set to 1, a row number is added and repeated on pages to the right.
How can I set the Cross object to recognize the first field (or the 2 first) to be the Row Header instead of getting a row number?
I have tried
for j := 0 to Table1.Fields.Count - 1 do
Cross.AddValue([Table1.Fields[0].AsString], [Table1.Fields[j].DisplayLabel], [Table1.Fields[j].AsString]);
Table1.Next;
and
Cross.RowLevels := 1;
but it does not work.
Thanks for helping.
BJL
Comments
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
{i,} j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView©;
Table1.First;
{ i := 0;}
while not Table1.Eof do
begin
for j := 2 to Table1.Fields.Count - 1 do
Cross.AddValue([Table1.Fields[0].AsString, Table1.Fields[1].AsString],
[Table1.Fields[j].DisplayLabel], [Table1.Fields[j].AsString]);
Table1.Next;
{ Inc(i);}
end;
end;
end;
BJL