Customizing Charts in a Group
Putting a chart in a group header implies that the chart will have the same look across all groups. In most cases, this is what you want because it creates consistency throughout the report. But there are times when you need to tweak the settings of one chart so that it is slightly different from the rest. As an example, assume a group chart plots between five and ten points for each group. The legend for each chart fits comfortably within the chart’s border. However, one of the groups has fifty items and its legend uses a font so small that you can’t read it. For this group, you would customize the chart so that it only shows the top ten items in the group and leave the remaining ones uncharted.
When making formatting changes to a chart, Crystal Reports gives you the option to apply the changes to all charts across the groups or just to the current chart. Before we look at how this works, let’s review the different ways to modify a chart. The first way is the most obvious: you make changes to the chart while in Design mode. The second way is to make changes while in Preview mode. The benefit of Preview mode is that as you make the change you immediately see how it affects the report. The reason why this is important is that you can only customize individual group charts in Preview mode.
Preview mode works with chart objects in unique way. For all other report objects, when you make a change to one of the properties, this change is applied throughout the whole report for that object. For example, if you change a field to bold formatting, then every place in the report where that field is shown is now bold. But this is not the case with chart objects. In preview mode, Crystal Reports associates each chart with the group it’s shown with. Any change made to a chart is only made to the chart for that individual group. It isn’t applied to all the charts in the report. As you page through the report, you can right-click on an individual charts within each group and modify it.
You can’t customize individual charts for each group in Design mode because no data is being displayed. All changes made to the chart are applied consistently throughout the report.
To format an individual chart, go to Preview mode and right-click the chart you want to change. Select the Chart Expert menu option and a submenu appears with the options, Applied To Group Template and Applied To This Instance. When you select the group template option, the changes you make are applied to chart for every group. By selecting the “This Instance” option, all changes you make only affect the single chart for that group. The other charts remain unchanged.
After making changes to an individual group instance, when you right-click the chart there are two new menu options: Apply Changes To All Charts and Discard Custom Changes. The first item, Apply Changes To All Charts, takes the changes you made to the current chart and applies them to chart template for the entire group. Thus, every chart in the group will now look like the currently selected one. The second item, Discard Custom Changes, cancels all changes you made to the custom chart and it reverts back to using the group template.
Customizing a chart is only available for the Chart Expert menu option. The changes made using the other menu options are always applied to the group template and affect all charts the same.