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

Chart repeating for each record?

8 Answers 642 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Saad
Top achievements
Rank 1
Saad asked on 08 Jan 2010, 05:44 PM
I have been working around telerik reports for many days. This time I needed to put up a chart on my report as well. I have XML data (coming from database) to been shown in report, plus to make chart from very same data. I did same as described in http://blogs.telerik.com/kevinbabcock/posts/09-02-06/bind_your_telerik_reports_to_xml_data.aspx to deal with xml. I have only two columns to be shown as text values (what I have done exactly as described in link), Then I those two columns on left side and placed a chart on right hand side. And populated it in NeedDatasource event. But chart is repeating for every data on left hand side. Please tell me what am I missing over here?

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 11 Jan 2010, 09:31 AM
Hello saadi,

This is the expected behavior - as explained in the Understanding Report Sections help article, the detail section is printed once for every row in the data source and it is the section where you place the report items that make up the main body of the report. Thus all items placed in the report detail section would be repeater as many times as the data rows in your database (or xml file in this case).
If you want to display the chart according to certain records only, you should consider using grouping and place the chart in a group header/footer section where it would be displayed once for each group and you can filter it according to the group criteria. Other approaches are possible as well, depending on your exact scenario which we are not aware of.

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Saad
Top achievements
Rank 1
answered on 11 Jan 2010, 03:38 PM
Thanks for reply,
I have got an idea but still I am confused how it is done in examples like ProductLine Report etc?
Just elaborate me this, so that I could make my report exactly like that way! Thanks
0
Steve
Telerik team
answered on 14 Jan 2010, 07:59 AM
Hello saadi,

The ProductLine Sales report is not bound, thus its single detail section would not be multiplied and you would have only one detail section shown i.e. no repetition of any kind.
It uses the Table item for the textbox on the left of the chart, which is a separate data region and it is bound separately from the report itself. In this regard it is sufficient to specify the data source to the Table item only, and there is no need to assign the same data source to the Report again. On the contrary, assigning the data source to the Report will cause the Table and Chart items to repeat for every record of the Report, which is something you want to avoid.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Saad
Top achievements
Rank 1
answered on 18 Mar 2010, 02:59 PM
Can you please provide a simple code to how to populate table and chart with XML data?
0
Davut
Top achievements
Rank 1
answered on 02 Mar 2012, 02:16 PM
SELAM Dear Saad,
I notice that the topic is old. But I just want to suggest you an idea. I had worked with many reporting tools beside telerik's reporting even I coded my own :)

Simply do that clear main Reports DataSource.
Add two List component on your detail band. And set their datasource's by their contexts.
Then bind the fields.

By this way Telerik Report's detail band won't repeat but your list's repeat internally.
 
I'm sure you solved that. 2 years past, maybe a new reporting tool released.

Hope this helps s.one,
Regards
0
Edmund Covington
Top achievements
Rank 1
answered on 14 Feb 2014, 11:58 AM
How do you filter according to the group criteria? I have set up a group called groupClient which is  grouped according to Fields.ClientName, but I can't seem to filter the data of the group footer such that the graph displays only the data for that group. Instead I get several groups showing the same information. 
0
Stef
Telerik team
answered on 17 Feb 2014, 03:22 PM
Hello Edmund,

Try binding the Graph item as illustrated in the How to use the ReportItem.DataObject property in expressions help article.

I hope this helps you.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Edmund Covington
Top achievements
Rank 1
answered on 19 Feb 2014, 09:28 AM
Thanks very much
Tags
General Discussions
Asked by
Saad
Top achievements
Rank 1
Answers by
Steve
Telerik team
Saad
Top achievements
Rank 1
Davut
Top achievements
Rank 1
Edmund Covington
Top achievements
Rank 1
Stef
Telerik team
Share this question
or