Could not convert variant of type (UnicodeString) into (Double)
With this code I try to show the Letters in my Report using CrossView. But I get this error message when I click Button1:
The following error(s) have occured:
Could not convert variant of type (UnicodeString) into (Double)
const
Letters : array[1..3,1..4] of string =
(('A','B','C','D'),
('E','F','G','H'),
('I','J','K','L'));
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
frxReport1.ShowReport;
end;
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView?©;
for i := 1 to 3 do
for j := 1 to 4 do
Cross.AddValue(, [j], [Letters[i,j]]);
end;
end;
end.
What is wrong here? Any suggestions?
The following error(s) have occured:
Could not convert variant of type (UnicodeString) into (Double)
const
Letters : array[1..3,1..4] of string =
(('A','B','C','D'),
('E','F','G','H'),
('I','J','K','L'));
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
frxReport1.ShowReport;
end;
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView?©;
for i := 1 to 3 do
for j := 1 to 4 do
Cross.AddValue(, [j], [Letters[i,j]]);
end;
end;
end.
What is wrong here? Any suggestions?
Comments
The Cell function in the CrossView has to be set to None when showing tekststrings!