Skip to Content
Author's profile photo Former Member

Using Charts in Crystal Reports – Part 2

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?

/wp-content/uploads/2012/05/chart1_97631.jpg

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.

/wp-content/uploads/2012/05/chart4_97632.jpg

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.

/wp-content/uploads/2012/05/chart8_97633.jpg

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.

/wp-content/uploads/2012/05/chart9_97634.jpg

We can use the Text tab to customize the Title and axis descriptions.

/wp-content/uploads/2012/05/chart10_97635.jpg

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:

/wp-content/uploads/2012/05/chart11_97636.jpg

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo jaheer ussain babu shajakhan
      jaheer ussain babu shajakhan

      hi how to drill down on graph

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Jaheer

      Drill down in graphs is very simple to implement in Xcelsius. After that you can add the Xcelsius component to Crystal.

      Hope this solves your problem.

      Author's profile photo jaheer ussain babu shajakhan
      jaheer ussain babu shajakhan

      ok thanks...when right click on chart and choose hyper link there is one option is there enable drill down..but that is only for DHTML View ly...if u dont mind please explain me about DHTML View..

      Thanks for your kind reply,

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Dhtml viewer can be used when the crystal report is used in conjunction with web applications, the following link has some details

      http://publib.boulder.ibm.com/infocenter/rsahelp/v7r0m0/index.jsp?topic=/com.businessobjects.integration.eclipse.devtools.doc/developer/DisplayReports4.html

      Author's profile photo jaheer ussain babu shajakhan
      jaheer ussain babu shajakhan

      Ok thanks.i think i am keep on asking doubts.once again thanks.

      Author's profile photo jaheer ussain babu shajakhan
      jaheer ussain babu shajakhan

      ok thanks..

      Author's profile photo Anthony Mendes
      Anthony Mendes

      Hi Debapriya,

      Thank you for taking the time and explaining charting in a simple way

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Anthony, hope it helps programmers and students.