crystal reports performance problem

Posted by Admin on 26-Feb-2007 05:57

Hi,

I'm using crystal XI and the crystal ActiveXReportViewer to create anv view reports via Progress.

The reports are fairly simple, without subreports, and workt great locally but when applied to the actual development environment it takes AGES!

A report that takes about 2 secs on my local machine takes about 4 minutes(!!) in the development environment. It does NOT work faster the second (or third, foruth...) time either.

The problem is identified to the openreport-method but I can't find anything on the web about performance tuning in this area.

Do you guys know of anything than could cause this or is it simply something you have to live with?

The code is nothing fancy:

DEFINE VARIABLE crApplication AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE crReport AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE crDatabase AS COM-HANDLE NO-UNDO.

CREATE "CrystalRuntime.Application" crApplication.

CREATE "CrystalRuntime.Report" crReport.

/* Set the report object */

crReport = crApplication:OpenReport("c:/temp/lenasreport.rpt").

/* Connect the viewer to the report (with the db connection ) */

chCtrlFrame:CrystalActiveXReportViewer:ReportSource = crReport.

/* View the report */

chCtrlFrame:CrystalActiveXReportViewer:ViewReport().

RELEASE OBJECT crApplication.

RELEASE OBJECT crReport.

All Replies

Posted by Alon Blich on 26-Feb-2007 09:12

Where's the query ?

Is the query written in 4GL and then passed to Crystal or written SQL ?

If it's 4GL is it a remote or shared memory connection ?

If it's SQL is there a separate SQL broker ?

What's the Progress version ?

Maybe you could post the query.

Posted by Admin on 01-Mar-2007 02:08

Oh sorry.

The report uses two xml-files so no query involved

The 4gl query is not the problem, it is fast and uses indexes correctly. The problem is the actual openreport.

The progress version is 10.x (not sure about the exact version) and crystal XI

Posted by Admin on 14-Mar-2007 08:52

I have experienced a similar problem which was related to the fact that the printer the report was saved with was not installed on the server.

On my pc I had a printer called laser1 and I used this to print the report whilst I was writing it. However when it was migrated to our reporting server this printer was not installed on the server. It would seem that crystal stores the last printer used in the report and when the report is opened again, it polls to try and find the printer. Sounds ridiculous, however that was the issue.

Posted by Admin on 07-May-2007 05:16

I have tried this code but it is not working ...

DEF VAR i AS INT.

DEFINE VARIABLE crApplication AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE crReport AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE chCtrlFrame AS COM-HANDLE NO-UNDO.

CREATE "CrystalRuntime.Application" crApplication.

CREATE "CrystalRuntime.Report" crReport.

/* Set the report object */

/* Connect the viewer to the report (with the db connection ) */

crReport = crApplication:openReport("C:\rachana\crystal\sample_simple.rpt").

DO i = 1 TO crReport:DATABASE:tables:COUNT:

crReport:DATABASE:Tables(i):SetLogOnInfo("sports2000","sports2000","AMishra","rajdevi").

END.

chCtrlFrame:CrystalActiveXReportViewer:ReportSource = crReport.

/* View the report */

chCtrlFrame:CrystalActiveXReportViewer:ViewReport().

RELEASE OBJECT crApplication.

RELEASE OBJECT crReport

it says the error Invalid comoponent-handle referenced while processing method/statement: CrystalActiveXReportViewer.

what is the solution or where i'm wrong

Posted by Admin on 07-May-2007 05:57

I have tried this code but it is not working ...

DEF VAR i AS INT.

DEFINE VARIABLE crApplication AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE crReport AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE chCtrlFrame AS COM-HANDLE NO-UNDO.

This one has not been assigned

chCtrlFrame:CrystalActiveXReportViewer:ReportSource =

crReport.

... and here you're using it. I guess you should use "crApplication" instead.

This thread is closed