how to set variables value??????

edited 9:12PM 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 9:12PM
    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 9:12PM
    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 9:12PM
    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

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.