Is it possible a CrossTab with text data?
Anu de Deus
Hampshire, UK
I want to create a grid with the CrossTab object, to print the contents of a stringgrid, but everytime the value of the cell is not numeric, it raises an exception.
Is there any way I can do this? I don't need to calculate any total or sub-total, just display plain text in the grid/cross-tab.
For example, from the demos, in the code below:
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView©;
for i := 1 to 16 do
for j := 1 to 16 do
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
end;
end;
I'd like to have this line instead:
Cross.AddValue(, [j], );
Any ideas?
Alex
Is there any way I can do this? I don't need to calculate any total or sub-total, just display plain text in the grid/cross-tab.
For example, from the demos, in the code below:
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView©;
for i := 1 to 16 do
for j := 1 to 16 do
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
end;
end;
I'd like to have this line instead:
Cross.AddValue(, [j], );
Any ideas?
Alex
Comments
Yourcrossname.CellFunctions[0]:=cfNone;