what should I do for using variable in scripts?

edited 2:04PM 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:04PM
    Use extra quotes when adding a variable to the Report.Variables:

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

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.