Version Information: This sample is prepared with Crystal Reports 2008
Creating a chart in Group Footer:
This is a continuation to my previous blog on Crystal Reports Charts (http://scn.sap.com/community/crystal-reports/blog/2012/04/30/using-charts-in-crystal-reports-part-1)
I will continue with the same sample data. In the previous example I had created a single chart showing the total marks obtained by all the students. But how to create a chart showing marks obtained in different subjects by a single student?
As we can see, the student marks are grouped per student. So we need to create a chart per group. The best way to do that will be to create another Group Footer section and insert a chart in this section.
We click on the “Insert Chart” icon. The chart Expert opens. Here we select the vertical Bar chart.
In the Data tab, we select “Marks” as the value to be shown in the bar chart, for each value of “Course” taken by each student. This will mean that there will be a different bar for each subject/course taken by the student and the height of the bar will be proportional to the marks obtained by the student.
In the Axis tab we put the Minimum and Maximum data values as 1 and 100. Auto Range is selected by default. It might be advisable to fix the maximum and minimum values, and the number of divisions when a number of charts will be displayed in the same report. This ensures uniform representation of data in all charts.
We can use the Text tab to customize the Title and axis descriptions.
Note: You cannot place a chart in Crystal Report Detail section. If you want a chart for each row of data, the solution would be to create a group on the primary key so that each group will contain just 1 row , then insert the chart in the group footer.
The final output looks as shown below: