Wrong format in column header in TfrxCrossView
Excuse my English, y'm French.
Y have a bad format in Colum Header in TfrxCrossView, My version of Fast-Report is 3.09.
No Database, just this in frxReport1BeforePrint:
<span style='color:blue'>
if (Sender.Name = 'Cross1') then
begin
Cross := TfrxCrossView(Sender);
z := 0;
for i := 1 to (StringGrid.RowCount - 1) do
begin
for j := 0 to (StringGrid.ColCount - 1) do
Cross.AddValue([z], [StringGrid.Cells[j, 0]], [StringGrid.Cells[j, i]]);
inc(z);
end;
end;</span>
And in Cross1OnCalcWidth method, this:
<span style='color:blue'>procedure Cross1OnCalcWidth(ColumnIndex: Integer; ColumnValues: Variant; var Width: Extended);
begin
case ColumnIndex of
0: Width := 213;
2: Width := 37;
4: Width := 37;
6: Width := 37;
8: Width := 37;
10: Width := 37;
else
Width := 64;
end;
end;</span>
Why Header is not correcly ?
Dergen.
Y have a bad format in Colum Header in TfrxCrossView, My version of Fast-Report is 3.09.
No Database, just this in frxReport1BeforePrint:
<span style='color:blue'>
if (Sender.Name = 'Cross1') then
begin
Cross := TfrxCrossView(Sender);
z := 0;
for i := 1 to (StringGrid.RowCount - 1) do
begin
for j := 0 to (StringGrid.ColCount - 1) do
Cross.AddValue([z], [StringGrid.Cells[j, 0]], [StringGrid.Cells[j, i]]);
inc(z);
end;
end;</span>
And in Cross1OnCalcWidth method, this:
<span style='color:blue'>procedure Cross1OnCalcWidth(ColumnIndex: Integer; ColumnValues: Variant; var Width: Extended);
begin
case ColumnIndex of
0: Width := 213;
2: Width := 37;
4: Width := 37;
6: Width := 37;
8: Width := 37;
10: Width := 37;
else
Width := 64;
end;
end;</span>
Why Header is not correcly ?
Dergen.
Comments
The solution is "MaxWidth" property in TfrxCrossView.
Look page 85 in "UserManual-en.pdf".
Der?§en.