FastReport script

I want to use FileExists & Application.Exename in the fastReport code. How to do it?

Comments

  • edited 1:51PM
    Would be interested, too.

    How to use, implement FileExists
  • edited 1:51PM
    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 1:51PM
    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.