<< Click to Display Table of Contents >>

 

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.

eurd-win-chart-auto-created-series-example

1.Drop the Chart control from the Toolbox onto the Detail band.

eurd-win-chart-add-to-report

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.

eurd-win-chart-add-data-source-button

 

3.Click the chart's smart tag and make sure that the Data Source and Data Member properties were specified correctly.

eurd-win-chart-auto-created-series-data-source

Note

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 preview as many times as there are records in the report data source.

1.Switch to the Chart Tools toolbar tab and click Run Designer.

eurd-win-chart-run-designer-button

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.

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.

eurd-win-chart-auto-created-series-data-settings

3.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.

eurd-win-chart-auto-created-series-properties

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.

Switch to Print Preview to see the resulting report.

eurd-win-chart-auto-created-series-result