Crystal reports user guide

Page 429

24 : Understanding Databases

• If you summarize on a linkable data type, the program adds a summary field to the SELECT clause of the SQL statement. • If you drill-down on a linkable data type, the program adds a WHERE clause to the SQL statement. • If you group in descending order on a linkable data type, the program adds an ORDER BY clause to the SQL statement. The statement also varies between tabs: • If you are working in the Preview tab, the statement includes the GROUP BY clause, as well as any aggregates that the report is pushing to the server. • If you are drilling-down, the statement varies depending on the underlying data and the level of drill-down. With each drill-down, the WHERE criteria changes. Also, if you drill-down to the details, the statement will not include a GROUP BY clause (since you no longer have any groups on that drill-down tab). To view the current SQL statement for the active tab, choose Show SQL Query from the Database menu. The Show SQL Query dialog box appears, displaying the SQL statement. Note: You can use the Formula Workshop to edit SQL expressions to be processed on the server.

Enabling server-side processing 1 On the File menu, click Report Options. 1 Select Perform Grouping on Server on the Report Options dialog box. This check box is inactive if Use Indexes or Server for Speed is not selected. 2 Click OK. Note: You can also enable or disable this option quickly by selecting or deselecting Perform Grouping on Server on the Database menu as needed. If Use Indexes or Server for Speed is not selected in the Report Options dialog box, this command is inactive.

Mapping database fields The Map Fields dialog box allows you to link report fields to their corresponding database fields when you have made changes to the structure of the database, or when you have created a report based on one database from a template of another report based on some other database that has the same table and field structure. In this way, the dialog box helps you to make sure your reports print with the current version of the active database. When you first create a report, the report draws its fields from the database as it exists at the time. If you change the structure of the database after you create the report, the program needs to adapt the report to the new structure.

Crystal Reports User’s Guide

411


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.