Add a Chart (Use a Series Template)

This document describes how to create a report with a Chart control bound to data and generate all series automatically based on a common template.

Add a Chart to a Report

  1. Drop the Chart control from the Toolbox onto the Detail band. After you drop the chart, the Chart Designer is automatically invoked if its Display the designer every time a new chart is added option is enabled. Close the designer at this step.
  2. Open the Toolbar's Chart Tools contextual tab and click Add Data Source to bind the chart to data.
  3. The invoked Data Source Wizard enables you to assign a data source to the chart. Bind the chart to a data source as described in the Bind to Data section.
  4. Click the chart's smart tag and make sure that the Data Source and Data Member properties were specified correctly.

The report's Data Source property should be set to None because the Chart is in the Detail band. When a report has its Data Source property specified, the Chart is repeated in the preview as many times as there are records in the report data source.

Adjust the Series Template

  1. Switch to the Chart Tools toolbar tab and click Run Designer.
  2. In the invoked Chart Designer, go to the Data tab to the right of the designer's window. Select a data source in the corresponding drop-down list and drag-and-drop the data fields onto the corresponding cells.
  3. The Series cell specifies a data field that should provide data for series names. A new series should be created for each record in this data field. Use the Argument and Value cells to define where to get data for point arguments and values.
  4. Switch to the Properties tab and expand the Series Template option. The Argument Data Member and Value Data Members properties are automatically assigned to the corresponding data fields. Make sure that the Argument Scale Type and Value Scale Type properties are set to appropriate values.

Customize the Chart

Perform the following customization to improve the chart's appearance:

  • Use the chart's Series Name Template property to add text to the beginning or end of each series name. For example, set the Begin Text inner property to "GSP in ".
  • Set the Labels Visibility property to False to avoid overlapping series labels.
  • Specify the color settings used to draw the chart's series. For instance, select Nature Colors in the Palette's drop-down list.

View the Result

Switch to Print Preview to see the resulting report.

Related Links

Related Articles
Sunday, 13 January 2019 Posted in Chart Control