S
saellen
Unregistered / Unconfirmed
GUEST, unregistred user!
高手请进,关于开发自定义打印预览控件,继承Tquickrep。但是就是不能显示自定义的打印预览窗体,而都是显示quickreport自已定义的窗体。 以下是控件源程序,请问就如何修改?来者有分,不够再加. (50分)<br />unit IceQuickRep;
interface
uses
Windows, Messages, SysUtils, Classes, forms, Controls, ExtCtrls, QuickRpt, QRPrntr;
type
TIceQuickRep = class(TquickRep)
private
protected
procedure preview; dynamic;
public
{ Public declarations }
published
{ Published declarations }
property onpreview;
end;
procedure Register;
implementation
uses Pview;
procedure Register;
begin
RegisterComponents('iceboy', [TIceQuickRep]);
end;
procedure TIceQuickRep.preview;
begin
with TfrmPview.Create(Application) do //这里是打印预览窗体。
begin
QRPreview1.QRPrinter := TQRPrinter(getparentform(self));
CurRep := self;
show;
end;
end;
interface
uses
Windows, Messages, SysUtils, Classes, forms, Controls, ExtCtrls, QuickRpt, QRPrntr;
type
TIceQuickRep = class(TquickRep)
private
protected
procedure preview; dynamic;
public
{ Public declarations }
published
{ Published declarations }
property onpreview;
end;
procedure Register;
implementation
uses Pview;
procedure Register;
begin
RegisterComponents('iceboy', [TIceQuickRep]);
end;
procedure TIceQuickRep.preview;
begin
with TfrmPview.Create(Application) do //这里是打印预览窗体。
begin
QRPreview1.QRPrinter := TQRPrinter(getparentform(self));
CurRep := self;
show;
end;
end;