Following article guides you to apply a custom sorting functionality to a Crystal Report Cross-Tab. Hope you have some basic knowledge in creating a basic crystal report.
Following illustration shows before applying the sorting functionality. Below image shows wrong order of month on column headers. Let's try to order the column headers on as Jan, Feb, Mar...etc.
Open the Crystal Report on the designer and select Group Options on Column section on Cross-Tab expert.
On the the Common tab select "In Specific Order" from sort drop down. On the specific Order tab select New button.
Now add each group for each moth. Type the group name as "Jan" and "is equal to "Jan". The value you enter here should be match with data on Month column on your data source. Once all months are added output will display as follows
Now if you want change column order Up/Down arrow can be used. Let's say financial year start with April, you can set the month on top using arrows.
Points of Interest
DataSet is used to create the report schema.
- 3 column (Month, Qty, Product) data table with dummy data is used populate the report
- Cross-Tab is added to the report from the designer
- Nov 14, 2012: Article created.