report variables

edited 10:55PM in FastReport 4.0
Hello,
I have report with many variables, for example [var1], [var2]
I use same report for two different applications, one of them has both variables
And other one just has [var1].
The first report works fine, but second gets error Undeclared var2. Any idea how to avoid this error
When I load the report with missing var2 or just null it if not passed.
Thank you

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:55PM
    the problem is you are using the variable in some where in the report(tfrxmemoview) and it has no value therefore the expression parser is triggered and a value is searched for in the ongetvalue event and since no handler you get the error message.either seed it with a default value, or remove it, or clear it after loading the report and before calling show or prepare.

Leave a Comment