Could not convert variant of type (UnicodeString) into (Double)

edited July 2013 in FastReport 4.0
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?

Comments

  • edited 5:18PM
    Problem solved by FR4-people:
    The Cell function in the CrossView has to be set to None when showing tekststrings!

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.