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

Will Crystal 9/10 Add Cmd speed up report record sel

Status
Not open for further replies.

BruceBussell

Programmer
Jul 14, 2003
49
US

Will Crystal 9/10 Add Command speed up report record selection, and will it be run on the server.

My understanding is:
Crystal treats Add Command as if it was running on a View or Stored Procedure. And so this should improve processing time vs selecting from tables in a report selection filter.

The goal here is to get the record selection from the report tables to be done on the server, and return only the selected records you need to the report for processing, vs pulling all the table's records over to the system that is running the report and selecting the desired records there using the Report Selection Filter.

 
It is run on the server, ut that doesn't mean that it will be faster.

The question you are really asking is whether you can pass the SQL from Crystal to a server, and the answer is yes.

Whoever explained to you how Crystal works is mistaken. If you check the Database->Show SQL Query as you construct a report, you will see the SQL that is being passed to the database, and you should be able to pass just about anything.

As for using the record selection, it may or may not pass it's SQL to the database, this is a design concern.

The fastest will likely be a Stored Procedure, because it has a precompiled execution plan. Then the speed will be similar in any of the three other methods you've mentions, providing you design them properly.

Going forward, pay no attention to whoever advised you that an Add Command wil be faster than using the Crystal GUI, or that SPs and Views are the same, this is based solely on design and implementation.

More often with Crystal implementations I use Views because they provide reusability and simplified maintenance. If I find the View slow, then I'll try to optimize, or as a last resort, got to a Stored Procedure, the reason being that Stored Procedures require that you pass single value parameters, which often doesn't fit with what the user experience should be.

I have an older FAQ that speaks to this topic here, most of it is still accurate:

faq767-3825

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top