Adding variables to dictionary programmatically

FadFad
edited 9:02AM 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 9:02AM
    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 9:02AM
    Hello Alex,
    I tried Insert and it worked perfectly ;)
    Thanks alot for your time.

    Best Regards,
    Fad

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.