Using the Cross-Tab Wizard

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

Xtreme management needs a summary report to provide a quick glance of its shipped orders. They 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.

  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: Repository, Crystal Repository, Commands, CustomerOrdersShipped, CustomerOrdersShipped. After the last object (CustomerOrdersShipped) is chosen, click the arrow (>) button.

    graphics/bookpencil_icon.gif

    We are not focusing on learning the specifics of the repository or commands at this point. If you want more information on these, see Hour 18, "Working with the Report Component Repository."


  3. The Enter Parameters dialog now appears. The prompt asks whether you want shipped orders or not. Because the requirements for this report is for shipped orders, choose True from the Discrete Values list box and then click OK.

  4. The Database Expert dialog appears again. The command will now be added to the Selected Tables list box. Click Ok.

  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, we need to enter the grouping and summarizing fields for the Xtreme report. The rows of the report will be 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 button under Columns and change the third list box from Each Day to For Half Year and then press OK to close the Group Options dialog. Finally, choose Order Amount from Available Fields and click the arrow (>) button under Summarized Fields so that the cell's summary is also selected. See Figure 14.3 for an example of the Cross-Tab Expert.

    Figure 14.3. Cross-Tab Expert Cross-Tab tab.

    graphics/14fig03.jpg

  7. Data input is practically done. Now that we've specified the necessary items to get the needed data, 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 14.4.

    Figure 14.4. Cross-tab in Preview.

    graphics/14fig04.jpg

  8. Before we continue, let's save our work. Choose File, Save As. Let's call this cross-tab1.rpt and then click OK.



Sams Teach Yourself Crystal Reports 9 in 24 Hours
Sams Teach Yourself Crystal Reports 9 in 24 Hours
ISBN: B003D7JUVW
EAN: N/A
Year: 2005
Pages: 230

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