FastReport script

edited 12:01AM in FastReport 4.0
I want to use FileExists & Application.Exename in the fastReport code. How to do it?

Comments

  • edited 12:01AM
    Would be interested, too.

    How to use, implement FileExists
  • edited 12:01AM
    You may try
    procedure BitBtn1OnClick(Sender: TfrxComponent);
    var  F:  TFileStream;
         FN:  string;                                                             
    begin
       FN := 'c:\temp\notfound.txt';
       try
         F := TFileStream.Create( FN, fmOpenRead); // that WON'T work if other process has the file opened in exclusive mode !!!
         ShowMessage( 'File size: ' + IntToStr( F.Size));                                                                                                               
         F.Free;
       except
         ShowMessage( 'File:  (' + FN + ') doesn''t exist');
       end;
       ShowMessage( Application.ExeName);                   
    end;
    

    Regards
    Mick
  • gpigpi
    edited 12:01AM
    Write user functions - see a Developer's manual "Custom Functions Connection to Report" chapter

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.