Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports Slow

Status
Not open for further replies.

edlssi

Programmer
Aug 30, 2001
14
US
I am integrating Crystal Reports into a Visual Foxpro application using data sources created in the application and connecting with ODBC. Currently this is about 300 reports run as reports, letters, statements, and coupons.

The Report Viewer loads immediately after the data processes but there is a large lag time before the data is populated to the viewer.

Running a report with 265 records the Viewer takes 15 sec. to display the report contents.

I have checked the ODBC Tracking and it is not tracking.

I have upgraded the latest .dll's from Business Solutions.

The methods for opening the Viewer and Reports are:

PUBLIC CRApplication
PUBLIC CRReport

CRApplication=CREATEOBJECT('CrystalRuntime.Application')
CRReport=CREATEOBJECT('CrystalRuntime.Report')

SELECT PRINTSET
*!* PRINTSET STORES THE NAMES OF THE REPORTS IN THE REPORTS DIRECTORY.

IF !SEEK(Thisform.LCREP)
WAIT WINDOW Thisform.LCRep+ 'Not Found in Printset.DBF'
RETURN
ENDIF

Rptform=ALLTRIM(Company.CRYSTLPATH)+ALLTRIM(PRINTSET.CRYSTALREP)

IF FILE(Rptform)
ELSE
=bottom5(rptform+'Not Found')
ENDIF

CRReport=CRApplication.OpenReport(RptForm,1)
THISFORM.OLEControl1.reportsource=CRReport
Thisform.OLEControl1.ViewReport()

DO WHILE Thisform.OleControl1.isbusy
WAIT WINDOW'Please Wait'nowait
ENDDO

Any ideas for improving performance will be appreciated.

Ed






 
The example should be good for you as it uses the RDC.

I used to do Fox coding, and I worked on a project last year with a VFP app and the performance was OK.

If you continue to have performance concerns, I can put you in touch with a VFP coder there, we worked through a few nuisances as I recall.

-k
 
Thanks Synapse... I know Craig's work well.. LOL.. I have his book and have called up that article from his web site in particualar.

Unfortunately; nothing in the article relates to slow performance with the exception of mentioning that ODBC is slow because of the translation layers.

Eddie
 
Are you using DBFs?

ODBC isn't as slow as your timing demonstrates.

Send an email to crystalreports at the hotmail domain and I'll put you in touch with someone if you'd like.

Don't want to post my email address directly in an attempt to stay out of the bots maws.

-k
 
Yes I use DBF's.

The way the process works is at the beginning of each program that runs a report I create one or more DBF's that are stored to a temp directory on the local machine drive.

As the program executes I assign a variable to each line that needs to print and at the end of the loops I do a SQL Insert into the table.

After the program executes I run either the Crystal Viewer or a print program depending on the button selected by the user.

After the preview or print the tables created are deleted.

Eddie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top