2
votes

I would like to create a report that has the following Format:

ID-1    |Name           |Subject 1|Subject 2|Subject 3|Subject 4|
ID-2    |Father Name    |Marks 1  |Marks 2  |Marks 3  |Marks 4  |

The data that is returned in the dataset is of the format:

ID-1|ID-2|Name|FatherName|Subject 1|Marks 1|etc|Etc|
ID-1|ID-2|Name|FatherName|Subject 2|Marks 2|etc|Etc|
ID-1|ID-2|Name|FatherName|Subject 3|Marks 3|etc|Etc|

I tried using Crosstab but I wasn't able to acheive the required output. An hint on how to accomplish it ? AND/OR what Crystal Report Feature|Control will help me achieve it ?

In a more sumamrized way, What I would like to do is to Show the Marks of the Subjects that are returned as multiple rows in a single row and display the similar data in each tow i.e. the ID-1, ID-2, Name. Father Name etc. just once ! (Note: The Data needs to be shown in 2 lines per Student as shown in the example.

1
don't lear crystal report that is obsolete in vs2012. instead learn and use XtraReport ratherkashif
We already have some reports in Crystal Report and cannot turn to any other solution at this moment.Saad Farooq

1 Answers

3
votes

By using pivot you can easily convert rows to column. Check this pivot example on sqlfiddle for your problem.