Click here to Skip to main content
15,867,568 members
Articles / Programming Languages / C#
Tip/Trick

Custom sorting for Crystal Report Cross-Tab

Rate me:
Please Sign up or sign in to vote.
4.70/5 (6 votes)
14 Nov 2012CPOL1 min read 56.2K   1.1K   6   4
Article describes how to apply a custom sorting for Cross-Tab

Introduction

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.

Background  

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. 

Image 1

Resolution  

Open the Crystal Report on the designer and select Group Options on Column section on Cross-Tab expert. 

Image 2

On the the Common tab select "In Specific Order" from sort drop down. On the specific Order tab select New button. 

Image 3

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 

Image 4

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 

  • Typed 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 

History

  • Nov 14, 2012: Article created. 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Sri Lanka Sri Lanka
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionDate wise Employee attendance Crystal reports in asp.net using C# Pin
chitresh suman31-May-15 22:39
chitresh suman31-May-15 22:39 
Questioni Need add Record Number in Column Crosstab Pin
opasid16-May-15 7:31
opasid16-May-15 7:31 
Questioncrystal report Pin
Member 112886605-Dec-14 1:26
Member 112886605-Dec-14 1:26 
Questionplease do it with coding Pin
karimkpg28-Apr-13 3:20
karimkpg28-Apr-13 3:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.