Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table which stores student's marks data in following format.

------------------------------------------------------
|Sr.No |Maths |Physics |Chemistry |Biology |Sem No.|
|1 |55 | 54 | 78 | 59 |1 |
|2 | 48 | 75 | 49 | 56 |2 |
------------------------------------------------------

I want to show this data on Crystal Report in following format.

Subject Name Sem - 1 Sem - 2
Maths 55 48
Physics 54 75
Chemistry 78 49
Biology 59 56

Please help me to achieve this.
Thanks in advance.
Posted
Updated 5-Sep-13 1:01am
v2

1 solution

Hello,
In your case there is 2 ways to get this output.
One is that in your data source is this format like your datatable contain this format(subject,Sem-1,sem-2). Bind that datatable to crystal report.

Another is Use Cross tab report for this.
 
Share this answer
 
Comments
Anand Dhamane 5-Sep-13 7:10am    
But,how to get that data in that format in datatable ?
Savalia Manoj M 5-Sep-13 7:22am    
You need to write your logic for Convert Rows into Column.
Anand Dhamane 5-Sep-13 7:33am    
Can u please help me to get this output ?
Savalia Manoj M 5-Sep-13 8:16am    
Find in Google for Convert rows into column in Datatable.
Anand Dhamane 5-Sep-13 8:36am    
Ok.I'll try to find some code to convert rows into column.
Thanks for your reply.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900