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!

Why does CR function so slow (with VB and Jet db)?

Status
Not open for further replies.

Jaco

Programmer
Aug 29, 2000
57
PL
Hello,

I use CR with VB and Access database. I use VB's Dataenvironment and when I generate a raport based on a command returning about 30000 rows, with a RecordSelectionFormula filtering 1 row, it takes long time (like 8 - 10 seconds) to see it. I'm new to CR and I wonder if it's normal. Maybe its better to create a separate recordset with where criteria instead of RecordSelectionFormula.

Thanks for any tips

Jaco
 
Constructing the record selection criteria to pass the SQL is the trick to getting reasonable performance with Crystal, it may be simpler and faster for you to build a separate recordset and use that, Crystal itrself isn't a very fast database engine.

Here's an example of how to build a parameter based record selection criteria to increase the likelihood of it passing to the database:

(
If {MyParm} <> &quot;&quot; then// allow for nothing entered
{MyTable.MyField} = {MyParm}
else
if
{MyParm} = &quot;&quot; then// allow for nothing entered
true
)

Note the parens wrapping it, and the qualify/disqualify.

It can work with a more simple approach, but this method seems to net the best results.

-k kai@informeddatadecisions.com
 
The recordset option always gives the most control. To see where the problem lies post your record selection formula. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
My record selection formula is simple {table.field}=something so it's no that it's very complicated or something. I've decided to filter records on the recordset level using where criteria and it works fast.

Jaco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top