how to set variable in report's scripts

edited 10:11AM in FastReport 3.0
i have define a variable in my report, name is "var1",

i can get the var1's value

but i can't set the var1's value

////////this is my code

procedure Page1OnBeforePrint(Sender: TfrxComponent);
var
newvar:string;
begin
newvar:=<var1>;
<span style='color:red'><var1>:='08';</span>
end;

//////////////////////////////
<var1>:='08'; is error

Comments

  • edited 10:11AM
    i have found the key.


    Get('my variable')
    Set('my variable', 10);
  • edited 10:11AM
    It must be like this
    Report.Variables.Variables:=#39+Edit1.Text+#39;

  • edited 10:11AM
    yzsind wrote: »
    i have found the key.


    Get('my variable')
    Set('my variable', 10);

    how i can do this in basic script

    when i run the report , error expression expected is shown

Leave a Comment