how to set variables value??????

edited 6:05PM in FastReport 3.0
In order to transfer variable to fr3 i used this code,"sreport.Variables:= trim(combobox2.Text);" but when report showed it raised exception:"raised exception class exception with message'memo3:error in expression "aaa": expression expected'. "aaa" is combobox2.text. how can i transfer a variable correctly??? thanks any way.

Comments

  • edited 6:05PM
    sreport.Variables := '''' + trim(combobox2.Text) '''';

    Variables are variants, so you can do:
    sreport.Variables := '''MyText''';
    sreport.Variables := 500;
    sreport.Variables := true;

    If you want store string in Variables then it must be stored as string IN Delphi (quoted).
  • edited 6:05PM
    Thank a lot DiGi. Yeah, it worked! if u don't mind shall we keep in touch by email?
    I really interested in delphi programming.
    my email is : tayir82@hotmail.com . thank you any way!
  • edited 6:05PM
    This is not true Delphi programming, it is much more "FastReport scripting"...

    You can contact me by PM on this board, i will get notify email and reply asap.

Leave a Comment