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!

sql expressions 1

Status
Not open for further replies.
Jul 21, 2001
102
US
Crystal Reports 9, Oracle 9

In order to make use of server-side grouping, is it necessary to have all the report groups based on a SQL expression? I have a group @sortname. It is a concatenation of name.sortname + name.id since there can be duplicate sortnames in the table. Since a SQL expression cannot concatenate these 2 fields, do I need two groups--%sortname and %id instead or can I leave the @sortname. In other words, do all of the groups in the report have to be based on fields and expressions rather than Crystal formulas to see any benefit?

Also in the record selection, should the entire record selection be based on SQL expressions for better performance? Sometimes I want to use parameters.
 
SQL Expressions are usually the exception (not the rule) when trying to achieve server-side processing. I would only use them when absolutely necessary (e.g. poor database construction where linking can't be achieved without string functions, etc.). A well constructed record selection formula (with or without using parameters) will usually be processed on the server.

You can always verify what's getting passed to the server by going to Database > Show SQL Query.

Check out synapsevampire's FAQ - "Optimizing SQL Pass Through using the Record Selection Formula": faq767-3825

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top