mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 15:10:22 +02:00
LazReport, make editor sample to find it's data under Mac
git-svn-id: trunk@40451 -
This commit is contained in:
parent
7fb6dd6a8f
commit
7267e70d32
@ -399,27 +399,34 @@ const
|
|||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
r: TfrReport;
|
r: TfrReport;
|
||||||
|
dataPath: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
UpdateAppTranslation;
|
UpdateAppTranslation;
|
||||||
|
|
||||||
|
dataPath := ExtractFilePath(ParamStr(0));
|
||||||
|
{$ifdef Darwin}
|
||||||
|
dataPath := IncludeTrailingPathDelimiter(ExpandFileName(dataPath + '../../..'));
|
||||||
|
{$endif}
|
||||||
|
|
||||||
LookCountries.Close;
|
LookCountries.Close;
|
||||||
LookCountries.FilePath := 'db/';
|
LookCountries.FilePath := datapath + 'db/';
|
||||||
LookCountries.TableName := 'countries.dbf';
|
LookCountries.TableName := 'countries.dbf';
|
||||||
LookCountries.open;
|
LookCountries.open;
|
||||||
|
|
||||||
LookCompanies.Close;
|
LookCompanies.Close;
|
||||||
LookCompanies.FilePath := 'db/';
|
LookCompanies.FilePath := datapath + 'db/';
|
||||||
LookCompanies.TableName := 'companies.dbf';
|
LookCompanies.TableName := 'companies.dbf';
|
||||||
LookCompanies.Open;
|
LookCompanies.Open;
|
||||||
|
|
||||||
Detail.close;
|
Detail.close;
|
||||||
Detail.FilePath := 'db/';
|
Detail.FilePath := datapath + 'db/';
|
||||||
Detail.TableName := 'disco.dbf';
|
Detail.TableName := 'disco.dbf';
|
||||||
Detail.open;
|
Detail.open;
|
||||||
|
|
||||||
Master.Close;
|
Master.Close;
|
||||||
Master.TableName := 'db/countries.dbf';
|
Master.FilePath := datapath + 'db/';
|
||||||
|
Master.TableName := 'countries.dbf';
|
||||||
|
|
||||||
comboIndex.Clear;
|
comboIndex.Clear;
|
||||||
comboIndex.Items.Add(cerNone);
|
comboIndex.Items.Add(cerNone);
|
||||||
@ -428,8 +435,8 @@ begin
|
|||||||
FCountryIndex := ComboIndex.Items.IndexOf('BYCOUNTRY');
|
FCountryIndex := ComboIndex.Items.IndexOf('BYCOUNTRY');
|
||||||
SetIndex('');
|
SetIndex('');
|
||||||
|
|
||||||
if FileExistsUTF8(ExtractFilePath(ParamStrUTF8(0))+'salida.lrf') then
|
if FileExistsUTF8(datapath + 'salida.lrf') then
|
||||||
OpenReport(ExtractFilePath(ParamStrUTF8(0))+'salida.lrf');
|
OpenReport(datapath + 'salida.lrf');
|
||||||
|
|
||||||
for i:=Low(rptArr) to High(rptArr) do begin
|
for i:=Low(rptArr) to High(rptArr) do begin
|
||||||
r := TfrReport.Create(self);
|
r := TfrReport.Create(self);
|
||||||
@ -438,7 +445,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
Composite.DoublePass:=true;
|
Composite.DoublePass:=true;
|
||||||
|
|
||||||
frSelectHyphenDictionary('hyph_es_ANY.dic');
|
frSelectHyphenDictionary(dataPath + 'hyph_es_ANY.dic');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.TheReportBeginDoc;
|
procedure TfrmMain.TheReportBeginDoc;
|
||||||
|
Loading…
Reference in New Issue
Block a user