Invalid variant type conversion
I try to use fast report in simple case :
1. I put PageHeader Band and Memo on that band
2. And code on this report like :
var
IDNUM : Integer;
procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
with Page1, Engine do
begin
IDNUM := 1;
end;
end;
procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
begin
Memo1.Memo := [IDNUM];
end;
begin
end.
3. I Preview that report and report error with information "Invalid variant type conversion"
What is wrong?
1. I put PageHeader Band and Memo on that band
2. And code on this report like :
var
IDNUM : Integer;
procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
with Page1, Engine do
begin
IDNUM := 1;
end;
end;
procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
begin
Memo1.Memo := [IDNUM];
end;
begin
end.
3. I Preview that report and report error with information "Invalid variant type conversion"
What is wrong?
Comments
procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
begin
Memo1.Memo.Text := '[IDNUM]';
or
Memo1.Memo.Text := IntToStr(IDNUM);
end;