procedure TGL_CC_ReportCollection.OpenReport( const ReportFileName: string;
fromMenuPrinc : Boolean);
var
FormCrystal : TForm;
begin
try
Screen.Cursor := crHourGlass;
try
FormCrystal := TFormCrystal.Create(Forms.Application);
FormCrystal.Name := 'TFormCrystal';
Try
CrystalActiveXReportViewer :=
TCrystalActiveXReportViewer.Create(FormCrystal);
oApp :=CreateOleObject('CrystalRuntime.Application');
oRpt:=oApp.openreport(ReportFileName,1);
CrystalActiveXReportViewer.ReportSource := oRpt;
InitializeReport(CrystalActiveXReportViewer, FormCrystal);
ShowReport(CrystalActiveXReportViewer, FormCrystal);
End; (* Try *)
except
on E:Exception do
begin
raise;
end; // on..end
end; // try..except
finally
Screen.Cursor := crDefault;
end; // try..finally
end; // OpenReport..end
fromMenuPrinc : Boolean);
var
FormCrystal : TForm;
begin
try
Screen.Cursor := crHourGlass;
try
FormCrystal := TFormCrystal.Create(Forms.Application);
FormCrystal.Name := 'TFormCrystal';
Try
CrystalActiveXReportViewer :=
TCrystalActiveXReportViewer.Create(FormCrystal);
oApp :=CreateOleObject('CrystalRuntime.Application');
oRpt:=oApp.openreport(ReportFileName,1);
CrystalActiveXReportViewer.ReportSource := oRpt;
InitializeReport(CrystalActiveXReportViewer, FormCrystal);
ShowReport(CrystalActiveXReportViewer, FormCrystal);
End; (* Try *)
except
on E:Exception do
begin
raise;
end; // on..end
end; // try..except
finally
Screen.Cursor := crDefault;
end; // try..finally
end; // OpenReport..end