Adding variables to dictionary programmatically

FadFad
edited 4:00AM in FastReport 2.xx VCL
Hi all,
I'm using fast reports 2.52 with BCB 6, and i'm trying to add new variables to the dictionary programmatically. I have looked at the FAQ entry 2.23, and tried the following code:

frReport1->Dictionary->Variables["TEST"] = "";

However the compiler gives me an error saying that Variables cannot accept char * (which is "TEST" in this case) . Therefore I tried the following code:

frReport1->Dictionary->Variables->Variable["TEST"] = "";

This code compiles however it doesn't add the variable test to the Data dictonary and is not effective.

Any thoughts ?

Best regards,
Fad.

Comments

  • edited 4:00AM
    Hi Fad!

    Try using R->Dictionary->Variables->Insert() function. The variable first must be added to the Dictionary.Variables:TFRVariables list.

    Regards:Alex
  • FadFad
    edited 4:00AM
    Hello Alex,
    I tried Insert and it worked perfectly ;)
    Thanks alot for your time.

    Best Regards,
    Fad

Leave a Comment