FastReport variables

Hello,

I have created a FastReport variable (Report->Variables...), let's name it MYVAR.
On the report I have added a memo and I linked it to that variable :

[MYVAR]

When I try to proview the report I get this error :

The following error(s) have occured:
Memo16: Error in expression '': Expression expected.

I'm getting this error at design time and runtime as well, although at runtime this variable gets initialised:

Report->Variables->operator []("MYVAR") = "Hello world !";

Is this a bug or there is a workaround for it?

Many thanks,
Vasile

Comments

  • edited 8:43PM
    I forgot to say that I'm using C++Builder 6.
  • edited 8:43PM
    Please read the programmer manual, "Modifying the variable???s value" section.
  • edited 8:43PM
    Hello Vasile

    Report->Variables->Variables["MYVAR"] = "'Hello world !'"; // Use ticks with strings

    Report->Variables->Variables["MYVAR"] = 1234;

    Hope this helps, Asko
  • edited 8:43PM
    In the meantime I found that this works as well:


    Report->Variables->Variables["MYVAR"] = QuotedStr("Hello World !");

    Thanks,
    Vasile

Leave a Comment