Repeat a graph in a telerik report

1 Answer 56 Views
Graph
Frank Osako
Top achievements
Rank 1
Frank Osako asked on 08 Nov 2022, 07:32 PM
I am trying to repeat a doughnut graph for each row returned in my data source in the visual studio report designer. Is this possible? It's currently combining all the rows into a single doughnut graph.

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 11 Nov 2022, 12:24 PM

Hello Frank,

Indeed, it is possible to create a graph for each row of the DataSource.

Generally, you may create a parent DataItem of your choice and set its Data Source to the Data Source you wish to use. That data item can be either the Report itself, a Table, a List, etc.

In the DataItem's detail section, you may add a Graph. It would be generated for each data row of the parent data item as desired. You may include the Graph data as a subset of the parent data item DataSource and use Bindings to pass the subset to the Graph - see Binding to data from the parent data item. For example, you may use JSON data with a nested collection with Graph data.

A more popular scenario is to have a Graph for each group of the main data. I have demonstrated this in the attached report. I have set a DataSource to the Report itself, and have introduced Report Groups by the field Year. The purpose is to display the Brand sales per year and compare them in the Graph. The Graph is in the Report Header section and it receives its data from the corresponding group instance through Bindings. The reason for placing the Graph in the header is to have it rendered just once. Remember that the detail section is rendered once per data record, whereas the Group Header and Footer are rendered once per Group.

The demo is a TRDP report that you may use with all our services and viewer. If you prefer, you may convert it to a Visual Studio Report - see How to import reports created with Standalone Report Designer.

Regards,
Momchil
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
Graph
Asked by
Frank Osako
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or