Monday, 20 October 2008

Crystal Reports XI Cross Tab Reports - Column Order



In Crystal Reports, with a cross tab report, the column order is important.
However, the label used to describe the column may not be good for sorting on. for example Month Name, we would not want months sorted alphabetically.
The report I am working on now can have dynamic colum names.
This is the answer.

In the query for the report, I return one column for the sort order, and another for the display value.
When setting up the cross tab, select the one for the sort order (e.g. Period) as the column group.
Then on the design/preview page, right click the column header, choose column options\group options.
The following dialog appears:



Choose Options tab on the dialog, this allows to to choose the field that will be used for the header.