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?

Comments

  • edited 7:18AM
    Correct is:

    procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
    begin
    Memo1.Memo.Text := '[IDNUM]';
    or
    Memo1.Memo.Text := IntToStr(IDNUM);
    end;

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.