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!

limit search for parameter

Status
Not open for further replies.

Piperp

Technical User
Apr 11, 2002
2
US
I have a report that pulls up information by ID number. The user has to enter the desired ID numbers into the parameter field. The problem is is that the database is extrememly large and it takes a very long time, esp. sice it keeps searching even after it pulls up the record. Is there a way to get the report to stop searching after it has a record for each ID number that has been entered?
 
Crystal must search every record, becuase it has no way of knowing when it has at least one record for every ID number until it has read every record.

You might try indexing your field. This is something external to crystal that the DBA must do, but it will help crystal performance quite a bit.

Also, feel free to email me your report and I can take a look at it froma performance standpoint if you like. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
the search will depend on how your report tables are linked.

Make sure that you use indexed links whenever possible... use the link even though it may seem at the time the link is not necessary.
Jim Broadbent
 
Perhaps your parameter criteria isn't getting passed to the database?

Check the Show SQL Query, it should contain the SQL where clause demonstrating that rows are being limited on the server side.

Crystal is notorious for NOT passing the SQL to the server side, so you end up getting EVERY row in the report, and then Crystal's engine will do the filtering, which proves VERY slooooooow.

Some basic rules:

-Don't use variables in any formulas used or referenced in the record selection criteria
-Always check that the SQL is getting passed

I would think that your record selection criteria looks something like:

{MyTable.MyField} in {?MyParm}

This should pass the SQL, if it isn't, then form your record selection criteria akin to the above and it should pass.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top