Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

11.06 Placing the Cross-Tab Object

Placing the Cross-Tab Object

If you look back at the cross-tab report example from earlier in the chapter, you might realize that the cross-tab object as it appears in the report designer doesn’t look like the cross-tab grid as it appears when printed on the report. This is because the report designer shows the cross-tab object as being a template for showing you what fields are used and how the cross-tab grid will be formatted. When the report is run the cross-tab object expands vertically and horizontally so that it can print as many columns and rows necessary to show each group. If you expect your report to have a lot of columns then make sure it is placed along the left side of the report to account for all the columns.

When you put a cross-tab object in a section, it will grow as large as necessary to print all the data. If you place other report objects below the cross-tab component, and in the same section, the cross-tab grid will probably overwrite them when it expands during the print process. Fix this by creating a second section in that area and place the lower data in the new section. This will let it appear just below the cross-tab grid without any overlapping.

The cross-tab object can only be placed in a certain sections: the Report Header/Footer and the Group Header/Footer. It can’t be placed in the detail section because it can’t print detail records. It also can’t be placed in the Page Header because it would be duplicated on each page without any of its data changing. This would create redundant information that wastes space.

Be careful about where you put the cross-tab object. Placing the cross-tab in the Report Header/Footer produces different results than putting it in the Group Header/Footer. It prints out whatever information is available to it. When placed in the Report Header, it has access to every record in your report. It summarizes all the data that is printed. When placed in the Group Header, it only has access to the data for that group. The cross-tab will be much smaller because it only prints a subset of the all the report data.