FastReport script

edited 10:28PM in FastReport 4.0
I want to use FileExists & Application.Exename in the fastReport code. How to do it?

Comments

  • edited 10:28PM
    Would be interested, too.

    How to use, implement FileExists
  • edited 10:28PM
    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 10:28PM
    Write user functions - see a Developer's manual "Custom Functions Connection to Report" chapter

Leave a Comment