写错了form5.pas
unit Unit5;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRPrntr;type
TForm5 = class(TForm)
QRPreview1: TQRPreview;
private
{ Private declarations }
public
{ Public declarations }
end;var
Form5: TForm5;implementation{$R *.dfm}end.
unit Unit5;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRPrntr;type
TForm5 = class(TForm)
QRPreview1: TQRPreview;
private
{ Private declarations }
public
{ Public declarations }
end;var
Form5: TForm5;implementation{$R *.dfm}end.
form2(启动):有AdoDataSet1,button1,
button1的click事件只要让dbgrid11里有数据就行
Dbgrid双击事件里,让form3显示,并且form3的Edit1里有dbgrid1的数据就行
//===============
form3.:有Edit1,和一个button,button的click实践代码:
form4.QRLabel1.Caption :=edit1.Text ;
form4.QuickRep1.Preview ;
/////=======
form4上有一个QuickRep控件。有QRLabel1,放在QRBand1上。
QuickRep的onPreview事件代码:
procedure TForm4.QuickRep1Preview(Sender: TObject);
begin
form5.QRPreview1.QRPrinter :=self.QuickRep1.QRPrinter ;
form5.ShowModal ;
end;
///======
form5上有QRPreview1。
完了,关闭form5后,怎么,,,,,,,关不掉form3了?
form5.show后,就有了?
着急呀,兄弟们,帮忙了!!!!!!!!
一定OK
加Form5.free
但是就是各个窗体都必须用show,不能用showModal;
The slash of the rain?
Go face them and fight them,
Be savage again .
Go hungry and cold like the wolf
Go wade like the crane.
The palms of your hands will thicken,
The skin of your cheeks will tan,
You’ll grow ragged and weary and swarthy,
But you will walk like a man!