Using the Cross-Tab Wizard

Let's work through an example for the Xtreme Mountain Bike Companythe fictitious company that corresponds to the sample database provided with Crystal Reports.

Xtreme management needs a summary report to provide a quick glance at its shipped orders. The managers want to know how much has been spent by country for every six-month period, but they only want to see the top 10 countries. The following steps show you how to create this report:

  1. Create a new report by choosing File, New and when the Report Gallery appears, choose As a Blank Report and then click OK.
  2. The Database Expert appears. In the Available Data Sources list, expand the following nodes: Create New Connection, ODBC. Select the Extreme Sample database 10, click Next, and then click Finish.
  3. Expand Tables, and double-click on Customer and Orders. Click OK.
  4. The Database Expert dialog appears again. Click OK again to accept the default linking.
  5. Insert a cross-tab by choosing Cross-Tab from the Insert menu, or click the Insert Cross-Tab button on the Insert toolbar (the fourth item from the left). This should present the Cross-Tab Expert dialog.
  6. Set up the initial cross-tab. In the Cross-Tab tab of the Cross-Tab Expert, enter the grouping and summarizing fields for the Xtreme report. The rows of the report are the countries, so select Country from the Available Fields and then click the arrow button (>) under Rows. The column grouping is going to be by order data, so choose Order Date from Available Fields and then click the arrow button (>) under Columns. Because the OrderDate is supposed to be by quarter, click on the Group Options drop-down under Columns and change the third list box from Each Day to For Half Year. Finally, choose Order Amount from Available Fields and click the arrow button (>) under Summarized Fields so that the cell's summary is also selected. The final result looks like Figure 10.3.

    Figure 10.3. Cross-Tab ExpertCross-Tab tab.

  7. Data input is practically done. Now that you've specified the necessary items, click the OK button to close the Cross-Tab Expert. Then place the object connected to your mouse in the top-left corner of the Report Header section. Press F5 to refresh the report and see the result in the report Preview as shown in Figure 10.4.

    Figure 10.4. Cross-tab in Preview.

  8. Before continuing, save your work. Choose File, Save As. Call this cross-tab1.rpt and then click OK.

Special Edition Using Crystal Reports 10
Special Edition Using Crystal Reports 10
ISBN: 0789731134
EAN: 2147483647
Year: 2003
Pages: 341
Simiral book on Amazon © 2008-2017.
If you may any questions please contact us: