Tutorial 12-2. Customizing Group Charts
Let’s look at how to customize an individual group chart by walking through a tutorial on it. In the last tutorial, we took the Crystal Reports sample report, Summary Group.rpt, and added a chart in the Page Header. In this tutorial, we will place a gauge chart in the Group Header and then modify an individual chart for only one of the groups. This demonstrates how one group can have formatting that is unique from the other charts.
- Open the Crystal Reports sample report, Running Totals Group.rpt.
- Select the menu options File > Save As and enter the filename, Customize Group Chart.rpt.
- In Design mode, right-click on the chart and select the option Insert Chart. The chart’s outline appears and it is attached to the mouse.
- Position the chart outline in the Group Header section and click the mouse button to place the chart. This immediately opens the Chart Expert dialog box.
- The Data tab is selected by default so that you can pick the data points to plot.
- Click on the field Customer.Customer Name and click the arrow button to use it as the On Change Of field.
- Click on the field Group Running Total and click the arrow button to use it as the Show Value(s) field.
- Now that you’ve selected the data to chart, you want to select the type of chart to display. Click on the Type tab and choose the Gauge chart.
- Click the OK button to save your changes and have the chart placed on the report.
- The default chart size is much larger than what we need. You can resize it to about half of its original size. If you preview the report, it might look something like this:
- This is okay, but we can clean it up a bit. Go back into design mode and move the chart to the left side of the page.
- We also want the chart to appear alongside the group data. Right-click on the gray area to the left of the Group Header and select Section Expert. Select the option Underlay Following Sections. This lets the chart appear beside the data rather than above it.
- To see how to customize an individual chart, let’s make some obvious changes that will make the chart stand out from the rest. Go into Preview mode and make sure you are at the first page. Right-click on the chart and select Chart Expert > Applied to This Instance. This lets you only modify the chart for the first group.
- Click on the Options tab and click on the Show Legend option to disable it.
- Click on the Text tab and clear out the text from each option.
- Click the OK button to save your changes. Look at the first page and you’ll see that the chart on the first page doesn’t have a legend or any chart titles. As you browse through the following pages you’ll see that they haven’t changed. The changes you made to the first chart don’t affect the remaining charts.