This is a migrated thread and some comments may be shown as answers.

Create Graph With Data From Object

3 Answers 209 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 05 Jun 2013, 02:02 PM
Hi,

I have been playing around with Telerik Reporting to see if we could use it to produce pdfs/printouts of data from our application that is displayed in a RadGridView.

A few of our grids have a sparkline column and I was trying to reproduce this in a report but I was having some trouble.

We have a data object that represents a single row in the report/RadGridView. This data object has a number of properties of various types for the different fields and one property which is a list of points used to create a sparkline.

I can get the values for the simple properties to display fine using textboxes and selecting the data we want using [=Field1] etc. However I can't see how to assign a data property to a GraphSeries so that the date from that property is plotted on the graph.

Any help you could give me on this matter would be greatly appreciated.

Thanks,

Steven

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 10 Jun 2013, 11:27 AM
Hi Steven,

Since you are trying to create a master-detail relation and you are using objects in your case it will be a very simple task. First you will have to create your ObjectDataSource and pass to it the collection of objects. Then set the data source of the report to this ObjectDataSource. Finally set the data source of the Graph item via binding to =Fields.YourListWithPoints. For design time purposes (that is, only to work with the designer, it will not affect the Graph item at runtime) you can create an ObjectDataSource and pass to it a single instance of YourListWithPoints.

If that is not your case or you need further help please elaborate. 

Regards,
IvanY
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Steven
Top achievements
Rank 1
answered on 11 Jun 2013, 02:16 PM
Hi,

Thanks for your help.

I have followed your steps but I am still unable to get any data showing in the Graph.

I would like the graph to have a single line series using the data I have attached at the datasource. I have played around with adding different types of series and attempting to map x, y values to the x,y values of the data objects but I have had no luck.

I have also tried to remove the axis lines and labels from the chart as I really only need the line series but again I have had no luck so far.
(what I would ideally like is something similar to your sparkline example).

Any further help you could give would be greatly appreciated.

Thanks,

Steven
0
IvanY
Telerik team
answered on 14 Jun 2013, 05:00 PM
Hi Steven,

I have attached a sample report with three classes - please check it and let us know if you have any other difficulties.

Regards,
IvanY
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Steven
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Steven
Top achievements
Rank 1
Share this question
or