Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

11.03 Creating a Cross-Tab Object

Creating a Cross-Tab Object

The name “Cross-Tab Report” is a little misleading. It makes it sound like the whole report only shows the cross-tab grid and that no other data is printed. This isn’t true. A cross-tab report refers to a report that has a cross-tab object in one of its sections. This object is similar to the other report objects on a report. It has properties that let you modify its fields and how it’s formatted.

There are two ways to add a cross-tab object to your report. The first way is to add a new report to your application from the Project menu and choose the Cross-Tab Expert from the Crystal Report Gallery dialog box. This is shown in Figure 11-3.



Figure 11-3. Choosing the Cross-Tab Expert from the Gallery.

You can also add a cross-tab object to an existing report by right-clicking on the report and selecting Insert | Cross-Tab. Both methods of adding a cross-tab object to your report gives you the dialog box shown in Figure 11-4.



Figure 11-4. The Cross-Tab Expert dialog box.

There are three primary input areas on this dialog box: Rows, Columns, and Summarized Fields. Below these three sections is the list of available fields. Add fields from this list into the appropriate sections above it. Do this by either dragging and dropping the fields or by selecting a field and clicking the one of the Add buttons: Add Row, Add Column, or Add Summarized Field. If you want to see an example of the data that a field contains, click on the Browse button.

All three windows require you to add a minimum of one field to each before the cross-tab is functional. For example, you can’t specify fields for the Rows and Summary Fields windows and not put a field in the Columns window. You can also add multiple fields to each window to make the cross-tab print additional data.