Friday, March 4, 2011

Displaying Multiple Columns in Crystal Report.


Problem: Display data horizontally in Crystal report.
 If you Want  to display horizontally data in crystal report you can use Multiple columns option  for example if you want to display following data horizontally
Student ID           Name
C0801                    Name1
C0802                    Name2
C0803                    Name3
C0804                    Name4
C0805                    Name5
Like this
Student ID           Name     Student ID             Name                                  
C0801                    Name1  C0802                    Name2
C0803                    Name3  C0803                    Name4
C0805                    Name5  C0806                    Name6
You can easily break rows into several columns horizontally according to your needs.
Solution: Displaying data horizontally in Crystal report.
For achieving multiple columns you need to create Mail Lable report in report wizard although this option is also available in Standard report Format but I found some difficulties therefore I have tested in Mail Lable and its work fine here for.



After creation you can see there is detail section that displays half as it is open in standard  reports here is  what  we use multiple columns help us to achieve our goal.

Now right click on detail section and go to section expert here you find layout tab in which you can resize colums according to your needs.


 There are four columns showing.
You can see here is options  Across then Down and Down then  Across on the given example I have used across then down  as follows.
Student ID           Name     Student ID           Name                                  
------------------------------------------->>>>>>>>>
C0801                    Name1  C0802                    Name2
C0803                    Name3  C0803                    Name4
C0805                    Name5  C0806                    Name6

Format with multiple columns options is only available on detail section.