Getting started with variables

edited 10:23AM in FastReport 4.0
Hi!

I have inserted a Memo1 field in to the report and set its contents: ReportNumber = [ReportNumber]
Then I defined ReportNumber variable and would like specify a value for this variable at design time so that I can preview the report. I have seen how to set the variable value at runtime. Is it possible to set it design time? I can't seem to figure out an expression required so that it will assign a text to the variable.

Thanks!
Atmapuri

Comments

  • edited 10:23AM
    Try to set ReportOptions at design time, and use some of the properties you can find there, like:
    var   LVersion  :string;                                                             
     
    procedure Memo8OnBeforePrint(Sender: TfrxComponent);
    begin
      with Report.ReportOptions do                                                                           
      LVersion := VersionBuild + '.' + VersionMajor + '.' + VersionMinor + '.' + VersionRelease;                                                                                                                                    
    end;
    

    And put [LVersion] as your Memo contents.

    Mick

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.