写错了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.

解决方案 »

  1.   

    其实窗体很简单:
    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了?
      

  2.   

    还有如果form5.ShowModal,form5的QRPreview里没有数据。当
    form5.show后,就有了?
    着急呀,兄弟们,帮忙了!!!!!!!!
      

  3.   

    也是我菜,不过TQRpreview真他妈不好用。delphi的报表功能要能有PB的那么好用就好啦。
      

  4.   

    把Form3.Showmodal 改为Form3.show,
    一定OK
      

  5.   

    或者在Form5onclose(sender;action)事件
    加Form5.free
      

  6.   

    给位,俺知道了,必须用form.show。不能用ShowMOdal,
    但是就是各个窗体都必须用show,不能用showModal;
      

  7.   

    不会啊,showModal没错啊,你只要按顺序把showModal出来的窗体依次关闭,是可以的
      

  8.   

        A RealmanDo you fear the force of the wind,
    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!