what should I do for using variable in scripts?

edited 2:15AM in FastReport 3.0
I describe Variable like Variable1.
So, I set value it in frxReport1's onGetValue.
--> frxReport1.Variables.Variables := 'N';

when I want to use this variable in FR3 Scriptte(Memo1OnBeforePrint),
I get an error message.
--> if <Variable1> = 'N' then Visible := false;

Error Mesage is : The fallowing error(s) have occured:
Memo1:Error in expression ": Expression expected

what should I do for using variable in scripts?

Thank you

Comments

  • edited 2:15AM
    Use extra quotes when adding a variable to the Report.Variables:

    frxReport1.Variables.Variables := '''' + 'N' + '''';

Leave a Comment