如何在加载Active Reports 6.0中的所有数据之前显示第一页

时间:2014-06-18 11:51:42

标签: c# winforms activereports

我有一个win-form应用程序,它有一些报告。我正在使用Active Reports 6.0来显示报告。我正在使用一个与数据源绑定的列表来绑定活动报告。

问题是这个列表有很多数据,首先它加载完整记录然后与数据源绑定,因此显示报告的时间很晚。所以我想当列表在那时获取一些数据时,活动报告应该显示一些已经加载到列表中的页面,同时这个列表继续加载所有数据。

我正在使用此代码显示报告

ActiveReport ar=new ActiveReport();
ar.DataSource=lstalldata;
ar.Run();

因此可以在从列表中获取所有记录之前运行报告?我陷入了这个问题。

3 个答案:

答案 0 :(得分:1)

请参阅以下博客文章,其中讨论了如何在绑定到非常大的数据时优化ActiveReports的性能:

http://our.componentone.com/2013/04/08/how-to-optimize-performance-of-section-report/

此致 Mohita

答案 1 :(得分:1)

您也可以尝试使用Run(boolean)方法并将其syncDocument参数设置为true。您可以获取代码段示例here

此致,Mohita

答案 2 :(得分:0)

I suggest one thing that if your page containing **Page Count** field so remove that field from page then you will get impact your active report performance.

It's default feature of active report that it load first page immediately and rest of them will continue loading. if your page hold **Page Count** field then it will wait to display first page until last page load.And one thing more run your report AsysnChronous mode
using below code

ActiveReport ar=new ActiveReport();
ar.DataSource=lstalldata;
this.ar=ar;
MethodInvoker mi=new MethodInvoker(RunReportAsynChronous)
mi.BeginInvoke(null,null);



Private void RunReportAsynChronous()

{

 if(this.ar !=null)

  {
   this.ar.Run();
  }

}