cancel
Showing results for 
Search instead for 
Did you mean: 

How do I handle large resultsets in CRXI without a performance issue?

Former Member
0 Kudos

Hello -

Problem Definition

I have a performance problem displaying large/huge resultset of data on a crystal report. The report takes about 4 minutes or more depending on the resultset size.

How do you handle large resultsets in Crystal Reports without a performance issue?

Environment

Crystal Reports XI

Apache WebSvr 2.X, Jboss 4.2.3, Struts

Java Reporting Component (JRC),Crystal Report Viewer (CRV)

Firefox

DETAILS

I use the CRXI thick client to build my report (.rpt) and then use it in my webapplication (webapp) under Jboss.

User specifies the filter criteria to generate a report (date range etc) and submits the request to the webapp. Webapp queries the database, gets a "resultset".

I initialize the JRC and CRV according to all the specifications and finally call the "processHttpRequest" method of Crystal Report Viewer to display the report on browser.

So.....

- Request received to generate a report with a filter criteria

- Query DB to get resultset

- Initialize JRC and CRV

- finally display the report by calling

reportViewer.processHttpRequest(request, response, request.getSession().getServletContext(), null);

The performance problem is within the last step. I put logs everywhere and noticed that database query doesnt take too long to return resultset. Everything processes pretty quickly till I call the processHttpRequest of CRV. This method just hangs for a long time before displaying the report on browser.

CRV runs pretty fast when the resultset is smaller, but for large resultset it takes a long long time.

I do have subreports and use Crystal report formulas on the reports. Some of them are used for grouping also. But I dont think Subreports is the real culprit here. Because I have some other reports that dont have any subreports, and they too get really slow displaying large resultsets.

Solutions?

So obviously I need a good solution to this generic problem of "How do you handle large resultsets in Crystal Reports?"

I have thought of some half baked ideas.

A) Use external pagination and fetch data only for the current page being displayed. But for this, CRXI must allow me to create my own buttons (previous, next, last), so I can control the click event and fetch data accordingly. I tried capturing events by registering event handler "addToolbarCommandEventListener" of CRV. But my listener gets invoked "after" processHttpRequest method completes, which doesnt help.

Some how I need to be able to control the UI by adding my own previous page, next page, last page buttons and controlling it's click events.

B) Automagically have CRXI use a javascript functionality, to allow browser side page navigation. So maybe the first time it'll take 5 mins to display the report, but once it's displayed, user can go to any page without sending the request back to server.

C) Try using Crystal Reports 2008. I'm open to using this version, but I couldnt figureout if it has any features that can help me do external pagination or anything that can handle large resultsets.

D) Will using the Crystal Reports Servers like cache server/application server etc help in any way? I read a little on the Crystal Page Viewer, Interactive Viewer, Part Viewer etc....but I'm not sure if any of these things are going to solve the issue.

I'd appreciate it if someone can point me in the right direction.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Amit: I am facing similar performance issues. Were you able to find any solution ?

former_member184995
Active Contributor
0 Kudos

Essentialy the answer is use smaller resultsets or pull from the database directly instead of using resultsets.