Welcome to the FoxLearn
Today we will learn how to Create a Chart using reports
First, You need to add a Report Viewer to Form 1, then we will create a stored procedure to get total orders export
You need to download Northwind database to play
You can download the Northwind database below this video
We will select order ID, convert orderdate to year, then count and group orders by year.
We will use entity framework to get data from stored procedure
You need to drag the chart report item from the Toolbox onto the report, then select chart type and set the DataSource to chart report
You need to add categories and value group to chart report
Use categories to group data
Categories provide the labels for chart elements
For example, in a column chart
category labels are placed on the x-axis of the chart, one for each set of columns
The Value group is used to determine the size of the chart element for each category group
For example, a Values field determines the height of a column in a column chart, or the size of a slice in a pie chart
When you design a chart report, you need to add at least one field to the Value group
Value groups are static in charts
If you add only one field to the Value group and, you do not add a field to the Series group, only a single chart element is displayed
If you add multiple fields to the Value group, a chart element is displayed for each value
If there are multiple fields in the Value group, the chart legend displays the name of each value.
Now the last thing we will change the chart title
Thank you for watching this video
