Task Based Help > Working with Report Fields > Creating Charts |
In the initial versions of C1Report, adding charts to reports required handling the StartSection event, generating the chart, and assigning the chart image to a field's Picture property. This is not hard to do, and continues to be the most flexible way to add dynamic images to reports.
However, this approach has two drawbacks:
The current C1Report supports custom report fields, including a chart field that is based on the C1Chart control.
To add a chart field to a Group Header section in your report, complete the following steps:
The chart data is automatically scoped to the current report group. For example, when rendering the "Beverages" section, only data for that category will be charted. You can customize the chart using many other properties such as Chart.ChartType, Chart.GridLines, Chart.Use3D, and Chart.Palette properties.
For more information on creating chart fields, see the Adding Chart Fields topic.
Note: For the complete report, see report "11: Charts" in the CommonTasks.xml report definition file, which is available in the ComponentOne Samples folder. |