아래 소스처럼 크리스탈 리포트 OCX를 IMPORT 해서
VIEW를 한다는데..
대체..아무리 ActiveX Import 해두..
uses 절에 CRAXDRT_TLB <-- 이넘이 생성이 안되더라구여
CRAXDRT_TLB 이거가 어디서 나오는지 이해가 안되더라구여
고수님들... 한번 봐주시기 바랍니다.. ^ ^;;;
/////// 소스
사용컴포넌트: (CRViewer9) , Application
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, CRVIEWER9Lib_TLB, OleServer,
CRAXDRT_TLB; <-- 요넘
type
TForm1 = class(TForm)
CRViewer91: TCRViewer9;
Application1: TApplication;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.ViewerReSize();
begin
CRViewer91.Width := Form1.Width - 10;
CRViewer91.Height := Form1.Height - 30;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ViewerReSize();
ViewReport();
end;
procedure TForm1.FormResize(Sender: TObject);
begin
ViewerReSize();
end;
procedure TForm1.ViewReport();
var
CrReport : IReport;
FileName : String;
begin
FileName := ExtractFilePath(Forms.Application.ExeName);
FileName := FileName + 'sample1.rpt';
CrReport := Application1.OpenReport(FileName,crOpenReportByTempCopy);
CrReport.EnableParameterPrompting := false;
CrReport.DiscardSavedData;
CRViewer91.ReportSource := CrReport;
CRViewer91.ViewReport;
CrReport := nil;
Application1.Destroy;
end;
end.
이곳에 생기던데요.. 델파이 6입니다.