Chart with Static Series
- Last UpdatedOct 30, 2024
- 4 minute read
Creates a report with a chart control bound to a data source, so that a particular series has its own data source.
Note:
In this simple example, the series has a single data source. Different data sources
can be used for different series if required.
-
Create a new report.
-
On the Toolbox, select a Chart control.
-
Click on the Detail blank space to position the control.

Note:
The Chart Wizard may be displayed at this point (if the Show wizard every time a new chart is added option is enabled). Click Cancel to close the Chart Wizard and manually customize the chart. -
To bind the chart to a data source, click the Smart tag, and select Add New DataSource from the Data Source drop-down list. The Report Wizard is displayed.

The wizard can be used to assign a non-dabacon data source to the chart.
The specified data source is then assigned to the chart's Data Source property. The Data Member property is also set, which specifies which table or view of the dataset the chart obtains data from.


Note:
The report Data Source property must be set to None. Otherwise, the chart is blank when previewed.
-
To add a series to the chart and specify the data binding properties, use the Series Collection Editor. It can be displayed either via the Properties window, or via the Series link using the Smart tag for the chart control.
-
In the Series Collection Editor, click Add, select the Bar view and click OK to create a series.
-
Switch to the Properties tab.

-
Set the Data Source property to the created dataset, define the Argument Data Member and Value Data Members properties.
-
Click Copy to create another series with identical properties, and set the View property to Point.
-
Click Close to save the changes and close the Series Collection Editor.
Note:
After this step, there may be too many data points which makes the chart difficult to interpret. The chart's Data Filters property is used to limit the number of data points shown by applying a filtering criterion. Click Series1 in the chart to select it, then in the Properties window locate the Data Filters item and click the ellipsis to display the Data Filter Collection Editor. -
Click Add to add a criterion, and define the properties:
-
Click Close to save the changes and close the Data Filter Collection Editor.
-
Repeat the same actions for Series2, for example, select the Data Filters property, add a filter and define the Column Name.
A number of modifications can be made to improve the appearance of a chart, for example:
-
Remove the legend as it displays the same data for each series. Select the legend item on the chart and in the Properties window, set the Visibility property to No.
-
The point labels for Series1 are unnecessary. Select the label and set the Labels Visibility property to No.
-
Customize the Series2 marker display. Replace the default circle with an upside-down triangle using the View > Point Marker Options> Kind property and set the Size to 12.
-
Rotate the X-axis labels for better readability. Click the AxisX item in the chart and modify the properties for the labels using the Label property. For example, set the Angle property to 20 and the Antialiasing property to Yes to improve the label display.
-
-
Click the Print Preview tab to display the result.
Refer to Create Layout Template / Report Definition and Bind Report to Non-Dabacon Data for further information.