Using the Cross-Tab Wizard


Start with 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. Follow these steps 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 11, 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 and click Finish to go to the report.

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 will present you with a shadowed box attached to your cursor. Place the box in any Header or Footer of your report (not on a page header or footer) and in this case put it in the upper-left corner of the Report Header. The box will become an empty cross-tab.

6.

Set up the initial cross-tab. Right-click on the empty cross-tab and choose Cross-Tab Expert. 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 Date, so choose Order Date from Available Fields and then click the arrow button (>) under Columns. Because the Order Date 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 Each Quarter. 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.

Click the OK button to close the Cross-Tab Expert 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.




Crystal Reports XI(c) Official Guide
Crystal Reports XI Official Guide
ISBN: 0672329174
EAN: 2147483647
Year: N/A
Pages: 365

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net