Crystal Report加载数据的速度很慢 [英] Crystal Report is Slow in loading Data

查看:92
本文介绍了Crystal Report加载数据的速度很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp.net中提高在Crystal Report中加载数据的性能?
加载数据需要很长时间.
第一次加载时需要花费时间(因为查询需要一些时间来获取记录).
单击下一个或预览时(页面导航...),也需要相同的时间.
何时可以将数据加载到报表中
在Firefox中打开报告后,它会更快.


示例代码

How can I increase the performance of Loading Data in Crystal Report in asp.net?
It takes a long time to load data.
At first time of loading it takes time (because of query it takes time to fetch Records).
When the next or preview is clicked (page navigation...) also it takes the same time.
When the data can be loaded in the Report
When the report is opened in Firefox it is faster.


Sample Code

DataTable reportTable = GetSource();

if (reportPath != "" && reportTable != null)
{
    reportDoc.Load(@reportPath);
    reportDoc.SetDataSource(reportTable);
    crv.ReportSource = reportDoc;
}


在页面加载中,每次加载记录时都会调用该函数.

如果我在(!IspostBack)中使用以上代码,则分页在报表中不起作用.

如何避免每次加载它们?



请给我解决方法
:(


In the page load the function is called each time the Records are loaded.

If I use above code in (!IspostBack) the paging is not working in the report.

How can I avoid them loading each time?



Kindly give me the solution
:(

推荐答案

发布的代码不够,至少您应该已经发布了特定的过程或事件.

检查此 Crystal报表加载缓慢 [
The Posted code is not enough at least you should have posted the particular procedure or event.

Check this Slow load in Crystal reports[^]


朋友,

我找到了解决该问题的方法.

我将报告文档存储在Session中,并且

我将报告文档分配给报告来源.

现在更快了.

代码就是这样

if(!IspostBack)
{
//获取源代码并
//将报告文档存储在会话中
}
if(Session ["ReportDoc"]!= null)
{
//在Crystal Report来源中单独分配报告文档
}


谢谢!
Friends,

I found the solutions for that problem.

I stored the Report Document in Session and

i assinged the report Document to the Report Source.

Now it is faster.

the code is like that

if(!IspostBack)
{
// Fetch the source and
// Store the Report Doc in Session
}
if(Session["ReportDoc"] != null)
{
//Assign the Report Document alone in the Crystal Report Source
}


Thanks!


这篇关于Crystal Report加载数据的速度很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆