Skip to Content
0
Former Member
Aug 14, 2013 at 09:51 AM

Too slowly!!(crystal report for java )

41 Views

Hi Expert

I have encountered difficulties recently .

Recently I use CrystalReportViewer to display My report,below is my java code

ReportClientDocument reportClientDoc = new ReportClientDocument();
String reportName = request.getParameter("REPORT_NAME");
try {
// 绑定到对应的报表模板
reportClientDoc.open(reportName, 0);

// 创建报表显示器
CrystalReportViewer crViewer = new CrystalReportViewer();

//设置登录用户名称密码
CrystalReportUtils.dataBaseLogOn(crViewer);

// 把前台参数传给水晶报表的参数列表
CrystalReportUtils.addFieldToReport(request.getParameterMap(),crViewer);

crViewer.setReportSource(reportClientDoc.getReportSource());
crViewer.setOwnForm(true);
crViewer.setOwnPage(true);
crViewer.setPrintMode(CrPrintMode.PDF);
crViewer.processHttpRequest(request, response, this
.getServletConfig().getServletContext(), null);
} catch (ReportSDKExceptionBase e) {
e.printStackTrace();
}


It costs me twenty miniutes to run this code !!! below is logs:

2013-08-14 17:39:28,480-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,480-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 217
2013-08-14 17:39:28,512-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,512-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 218
2013-08-14 17:39:28,558-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,558-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,558-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 219
2013-08-14 17:39:28,590-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,590-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 220
2013-08-14 17:39:28,636-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,636-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,636-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 221
2013-08-14 17:39:28,668-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,668-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 222
2013-08-14 17:39:28,714-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,714-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,714-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 223
2013-08-14 17:39:28,747-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,747-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 224
2013-08-14 17:39:28,793-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,793-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,793-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,793-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,793-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,793-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 225
2013-08-14 17:39:28,840-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,840-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 226
2013-08-14 17:39:28,871-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Reading database record
2013-08-14 17:39:28,871-[HL] INFO TSLVReader #1 com.crystaldecisions.reports.queryengine - Rowset restart: moveToStart true
2013-08-14 17:39:28,871-[HL] DEBUG TSLVReader #1 com.crystaldecisions.reports.basicdataengine - Total number records read so far is 227

can you tell me why crystal reports needs twenty minuts to read database record?