Chart repeating for each record?

9 posts, 0 answers
  1. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 08 Jan 2010 Link to this post

    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?
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 11 Jan 2010 Link to this post

    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.
  3. DevCraft banner
  4. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 11 Jan 2010 Link to this post

    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
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 14 Jan 2010 Link to this post

    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.
  6. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 18 Mar 2010 Link to this post

    Can you please provide a simple code to how to populate table and chart with XML data?
  7. Davut
    Davut avatar
    11 posts
    Member since:
    Jul 2011

    Posted 02 Mar 2012 Link to this post

    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
  8. Edmund Covington
    Edmund Covington avatar
    16 posts
    Member since:
    Jan 2014

    Posted 14 Feb 2014 in reply to Steve Link to this post

    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. 
  9. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 17 Feb 2014 Link to this post

    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.

  10. Edmund Covington
    Edmund Covington avatar
    16 posts
    Member since:
    Jan 2014

    Posted 19 Feb 2014 in reply to Stef Link to this post

    Thanks very much
Back to Top
DevCraft banner