Hour 3, "Accessing Your Data," introduced the new SQL Commands feature of Crystal Reports 9. Let's perform a quick review of what this feature is and what advantages it has. With reports based on tables, views, or stored procedures, Crystal Reports does the dirty work of generating a query in the background. This query incorporates which fields you have used in the report, any sorting or filtering you've applied, and even some calculations. This is one of the strengths of Crystal Reports you need not be an expert at writing SQL to use the product. All that complexity is abstracted away from the user designing the report. However, sometimes the person developing the report is familiar with the SQL language, and perhaps is also the database administrator. In situations like this, these people often want to write their own query. This could be because of several reasons, including
The SQL Commands feature is meant to address these needs. Rather than adding a table or view to a report, you can add a SQL Command. This command represents a SQL query that you will type in. After this SQL Command is created, it is treated just like a table in that it contains fields that can be used in the report and can be linked to other tables or SQL Commands. For more information on the creation of SQL Commands, see Hour 3. |