about "Invalid variant type conversion"

edited 10:36PM in FastReport 3.0
when i tring to execute codes in fastreport 3, i get the error 'invalid variant type conversion'.

var
s1:string;
ss:string;
begin
s1:='asdfghj';
ss:=copy(s1,2,3);
end;

why? help me!!

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:36PM
    what version?
    where are you writing this code?
    top of code page
    var
    s1:string;
    ss:string;
    //makes variables global to report objects.
    //if code below is written in the empty begin end block at bottom of code page
    // variables will be initialized at start of report
    begin
    s1:='asdfghj';
    ss:=copy(s1,2,3);
    end.
    //btw it works ok no error.

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.