How to Add an Array to a Script

edited 12:23PM in FastScript
I need to add an array of currency values from my Delphi program into my script so it can be used as a variable within the script.

I know that within a script, I can add code like this:
arr[1] := 100;
arr[2] := 200;
arr[3] := 300;

But I need to create it within my program and make it available within the script. Is this possible?

Thank you.

Jack

Comments

  • edited 12:23PM
    I got an answer from Paul Gurskey in support and I am posting it here in case it is helpful to anyone else:

    Use in Delphi:
    var a: variant; 
    begin 
    a:=VarArrayOf([1,2,3]); 
    frxReport1.Script.Variables['a']:=a; 
    frxReport1.ShowReport(); 
    end;
    
    in script:
    procedure Memo1OnBeforePrint(Sender: TfrxComponent); 
    begin 
    Memo1.Text:=a[2]; 
    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.