How to use FileExists function at PascalScript?

uses SysUtils;

procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
  if FileExists(<frxDBDataset1."filename2">) then
  begin
    Picture1.LoadFromFile(<frxDBDataset1."filename2">);
  end;
end;

begin

end.

After run script, got "identifier expected" error.
uses "C:\\SysUtils.pas";

procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
  if FileExists(<frxDBDataset1."filename2">) then
  begin
    Picture1.LoadFromFile(<frxDBDataset1."filename2">);
  end;
end;

begin

end.

After run script, got "Undeclared identifier: 'FileExists'".

How to solve the problem?

Comments

  • edited 8:22PM
    You can solve that adding the function throug OnUserFunction event... For that, see FastReport's user manual on "how to add own functions"...

    If you can just add a Uses to FastScript, this should be better, but while you can't you can add the function...

    []'s,

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.