FileExists function kak mojna
Privet,
u mne script takoe
....
Picture1.LoadFromFile(<Table1."FileName">);
...
Problema takaya , kogda niyeto eti risunuk otcot prikratit, a vapshi ect ili mojna dobavit funksiye FileExists
Togda ya magla pisat
If FileExists(<Table1."FileName">) then
Picture1.LoadFromFile(<Table1."FileName">) else
Picture1.LoadFromFile('C:\NoFile.jpg');
Spasibo,
u mne script takoe
....
Picture1.LoadFromFile(<Table1."FileName">);
...
Problema takaya , kogda niyeto eti risunuk otcot prikratit, a vapshi ect ili mojna dobavit funksiye FileExists
Togda ya magla pisat
If FileExists(<Table1."FileName">) then
Picture1.LoadFromFile(<Table1."FileName">) else
Picture1.LoadFromFile('C:\NoFile.jpg');
Spasibo,
Комментарии
Подключение внешних функций к отчету
подробно описано в документации.
procedure FormCreate(Sender: TObject);
function FindFile(Fn : String): Boolean;
function CallMethod(Instance: TObject; ClassType: TClass; const MethodName: String ; var Params: Variant): Variant;
....
Private
...
...
function TFrm_Ana_Form.FindFile(Fn: String): Boolean;
begin
if FileExists(Fn) then Result:=True else Result:=False;
end;
procedure TFrm_Ana_Form.FormCreate(Sender: TObject);
begin
fsGlobalUnit.AddMethod('function FindFile(Fn : String): Boolean', CallMethod, 'MyFunc', 'This function = FileExists');
end;
function TFrm_Ana_Form.CallMethod(Instance: TObject; ClassType: TClass;
const MethodName: String; var Params: Variant): Variant;
begin
if UpperCase(MethodName) = 'FINDFILE' then
Result := FindFile(Params[0]);
end;
...
end.
Na versiya 3.19.1 rabotayt a 3.19.4 ili 3.19.5 pachimota ne rabotayt,
Spasibo
end
Ya shital no chota ne poluchitsa
Spasibo,
читай вот эту ветку http://www.fast-report.com/en/forum/?p=/discussion/2838