Creating Cross-Tabs


Concept


Steps:

  1. Begin by opening the Room Capacity report.

     

    Click the Open button.

    Step 1
  2. Click the Room Capacity list item.

    Step 2
  3. Click the Open button.

    Step 3
  4. Open the Format Cross-Tab dialog box. You can open the dialog box by selecting Insert, Cross-Tab from the menu bar, or by clicking the Insert Cross-Tab button on the supplementary toolbar. For this example, use the menu option.

     

    Click the Insert menu.

    Step 4
  5. Click the Cross-Tab... menu.

    Step 5
  6. You use the Cross-Tab Expert dialog box to specify which fields represent the row, column, and summarized fields. You can add these fields in two ways:

    • Highlight the field and click the appropriate button.

    • Highlight the field and drag it to the appropriate box.

    Step 6
  7. The Available Fields list box displays the report fields and database fields that you can add to the cross-tab object. Add the required fields to the appropriate columns. The report fields are not completely visible.

     

    Click the horizontal scrollbar.

    Step 7
  8. For this example, you want BLDG_CD in the columns, ROOM_CAPACITY in the rows, and ROOM as the summarized field. Begin by adding BLDG_CD to the Columns section.

     

    Click the Add button.

    Step 8
  9. Next, add the ROOM_CAPACITY field to the Rows section.

     

    Click the ROOM_CAPACITY list item.

    Step 9
  10. Click the Add button.

    Step 10
  11. Finally, add the ROOM field to the Summarized Fields section.

     

    Click the ROOM list item.

    Step 11
  12. Click the Add button.

    Step 12
  13. For summarized fields, the Change Summary option is available to change the summary settings if required.

     

    Click the Change Summary... button.

    Step 13
  14. You can use the Edit Summary dialog box to change the summary type of the cross-tab's summarized fields. For this example, you want to retain the current settings.

     

    Click the OK button.

    Step 14
  15. Click the Style tab.

    Step 15
  16. You use the Style tab to add predefined styles to the grid.

     

    Click the Basic - Indigo list item.

    Step 16
  17. Click the Customize Style tab.

    Step 17
  18. You use the Customize Style tab to create and add customized styles to the grid. In this example, you want to display cell margins to make the table look neat.

     

    Click the Show Cell Margins option.

    Step 18
  19. Click the OK button.

    Step 19
  20. Click the Group Header section of the report to place the cross-tab object at the end of the report.

     

    Click the Group Header #1 cell.

    Step 20
  21. The cross-tab object appears in the Report Footer section of the Design page. The cross-tab object contains a grid, based on the parameters you specified. Crystal Reports automatically adds an additional row and column for totals. You can also modify the cross-tab object by resizing and formatting the fields in either Design or Preview mode.

    Step 21
  22. Next, view the results.

     

    Click the Refresh button.

    Step 22
  23. The report now includes a cross-tab object.

     

    Next, save the report.

     

    Click the Save button.

    Step 23

You have successfully inserted a cross-tab object in a Crystal report.

Table of Contents  Start Topic