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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Writer VFP 9.10

Status
Not open for further replies.

crossface

Programmer
Nov 30, 2002
81
US
I am going from VFP 6.0 & 7.0 to VFP9.0

I have noticed that reports run very slowly in VFP 9.0 I have only done this one report.

I wonder if something has changed and the way I have done my reports in the past needs to change.

Here is how I get the cursor for the report.

In the code of the data environment , I will write something like this

Select *;
from (tablename)
into cursor TempReport

I don't have the fasters machine Windows 2000 laptop. However, it takes about 3-45 seconds for the report to open.

If I put abrowse after getting the cursor, from that point on it is OK, before that is where the delat is.

Any suggestions

Thanks

Kevin Cotter
PES
 
There were major changes to the reporting system in VFP 9.0. These are outlined in the help file. The changes have caused reports to run more slowly...but add LOTS of new benefits. Also, unless you need all the fields, don't do SELECT * as it will be slower than specifying the fields you do need.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 

Kevin,

If I put abrowse after getting the cursor, from that point on it is OK

In that case, the problem has got nothing to do with reporting. The slowness is in getting the cursor.

If you are literally doing

Select *;
from (tablename)
into cursor TempReport

then it should be almost instantaneous (because behind the scenes VFP will be opening a new instance of the table rather than doing a SELECT).

An alternative to the SELECT would be:

USE (tablename) AGAIN ALIAS TempReport

It might be worth trying that, but I can't see why your original SELECT would be slower than that.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
To follow up on what Mike said, I wonder if this is actually a situation where some change in VFP 9 has made data retrieval slower for you and this is where you happen to have caught it.

One biggie for people has been a change related to code pages. If the code page for a table (CPDBF()) isn't the same as the current code page (CPCurrent()), some queries can't be optimized.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top