SSRS Reports
In this article, I will discuss how to add chart controls to reports defined in SSRS.To work with this, I will use a sample report which I showcased in my article Basics of SSRS.
Below is the step-by-step process to work on this sample.
- Generate & Define the SSRS report.
- Add Chart Control to the report.
- Set Datasource to Chart Control.
- Define Fields to be used by Chart Control.
Generate & Define the SSRS report
1. Once you generate & define your report, the report will look similar to shown below. Here I have generated reported based on my article "Basics of SSRS".
Design View
Preview
Add Chart Control to report
1. To add chart control-click on the Design tab.
2. Now go to menu items select View, and select Report data.
3. Select toolbox from "Report Data" as shown below.
4. Now from Report Items, double click "Chart", which will show a list of charts available. From this list let's select the first chart control& click the ok button.
5. Now chart control will be added to the report. So now let's align it properly to the right.
Set Datasource to Chart Control
1. To set data source right click chart control, Select Chart, and Select Chart Properties as shown below.
2. Now this shows up a window as shown below. So let's select / change values accordingly. The data source that I have selected is DataSet1, as this is the same source used by the report (see in ReportData).
3. After setting the values click the ok button.
Define Fields to be used by Chart Control
1. To set fields to the chart control. Move the mouse pointer to the "Drop data fields here", "Drop series fields here" & "Drop category fields here" sections.
2. When you move the mouse pointer to the above-mentioned sections, a small image is shown in the right corner of the sections
(see Drop data fields here). Click the image which will show up the fields specific to the Dataset which you have assigned in one of our above steps.
3. In my case I have added fields in "Drop data fields" & "Drop Series fields". After adding fields, save it & go to the "Preview" tab which should show up data similar to below.
Don't forget to rate the article, if it helped!
Happy coding....Hope this helps!