现在的位置: 首页 > 综合 > 正文

FastReport的问题 在先等待

2012年12月14日 ⁄ 综合 ⁄ 共 839字 ⁄ 字号 评论关闭
FastReport的问题 在先等待 VCL组件开发及应用
http://www.delphi2007.net/DelphiVCL/html/delphi_20061222111309195.html
我用frxReport+frxPreview来显示报表    
  代码如下  
      Screen.Cursor   :=   crHourGlass;  
   
      try  
          cdsP.Close;  
          cdsP.CommandText   :=   'Select   *   from   sjb   ';  
          cdsP.Open;  
   
          if   cdsP.IsEmpty   then  
          begin  
              application.messagebox('没有数据可以显示','提示信息',MB_OK);  
              Exit;  
          end;  
          frxReport1.LoadFromFile(AppPath   +   '\report\YJStat2.fr3');  
          frxReport1.PrepareReport;  
          frxReport1.ShowReport();  
      finally  
          Screen.Cursor   :=   crDefault;  
          frxPreview1.Cancel;  
      end;  
  现在问题出现在两个方面。  
  1。当在统计过程中(也就是说有100页,现在到50页的时候)重新点击统计按钮,这个时候程序报错。   这种情况怎么控制。  
  2。当在统计过程中(也就是说有100页,现在到50页的时候)关闭了该窗体。程序自动关闭。这种情况怎么控制。  
 

程序报错的提示是什么?

我捕获的错误    
  Access   violation   at   address   00000001.   Read   of   address   00000001

设置frReport的ShowProgress=True,这样在统计的过程中会出现进度条,其他操作不能进行。

抱歉!评论已关闭.