Another key database feature of Crystal Reports is the ability to create SQL expressions using the purpose-built SQL Expression Editor, as shown in Figure 8-2:
When creating a SQL expression field, you have access to all of the SQL functions and operators that are supported by your particular database server. These expressions are evaluated directly on the server with their values returned to Crystal Reports. Be aware, though, that the same function or feature may not be available if you change the source of the report from one database platform to another.
If you're planning to use SQL expressions, you may want to turn back to Chapter 6, "Creating .XML Report Web Services," to review best practice for using this feature.
SQL expressions are a handy way to add discrete calculations to a report, but, if you find yourself creating the same expressions for multiple reports, you may want to consider using a stored procedure, a view, or a SQL command to eliminate repetitive coding.
Was this article helpful?