Getting Duplicte Pie Charts from a single DataSource?

3 posts, 0 answers
  1. Mosaix
    Mosaix avatar
    2 posts
    Member since:
    Oct 2014

    Posted 23 Oct 2014 Link to this post


    So, a Telerik Reports newbie here and I have a question about all of my charts doing this funny little thing with grouping and returning multiple pie/bar/line charts.

    So lets start with the basics, I have a Pie Chart that has two columns from the stored procedure... Age Group, and PeopleServed.  The RecordSet should look something like this:

    AgeGroup        PeopleServed
    0-4                    3
    12-14                85
    15-17                55
    18-20                26
    Age not Know   12 

    In SSRS in Visual Studio this is a really simple Pie Chart and completed in seconds.  X= AgeGroup, Y=PeopleSever, done!  One pie chart, not one for every AgeGroup repeating the same data over and over again.  However in the stand alone Report Designer I get the attached photo instead.    

    I have to admit in my version of the Report Designer (Report Designer Q2 2014) that when I tried to add the data source of a stored procedure from SQL, I couldn't add it.  It simply would not let me add that data set even after I tested it and it had the same number of columns and was indeed retuning data.  I had to add a 'test' data source with two 'dummy' fields of the same name just to get the pie chart added and change the Data Source after.  So on top of that headache, when I do add the correct live data I get this mess of multiple charts.

    So I assumed the issue was with the grouping somewhere, so I followed the instructions found on Telerik's website ( on how to set up the seriesGroup, categoryGroup and Series which can be seen in my second file attached.

    So, assuming at this point that one of those groups was causing the issue I started to remove them.  All of them at one point.  I even tried to dumb the report down to just an X and a Y axis and I STILL get this grouping of the pie chart showing up 5 times no matter what settings I fix/change/alter.

    So I am calling on the experts here...  why is this happening?  What did I do wrong with this and many reports to get these multiple charts to repeat?



  2. Stef
    Stef avatar
    2923 posts

    Posted 28 Oct 2014 Link to this post

    Hi Ed,

    Below is a quote from mu reply in your support ticket #872969 on the same question:

    The Graph item is a data item with its own DataSource property. If you have set both the report's and Graph's DataSource properties, the Graph will produce as many category/series groups as records in the Graph's DataSource, and additionally the report will produce as many Detail sections (probably with a Graph item in them) as records in the report's DataSource.

    Thus you need to leave the report's DataSource to null, and set only the Graph.DataSource.

    About using data in the report, the SqlDataSource wizard will guide you trough the steps to select a database, type SQL query or choose a stored procedure and test it.

    The SqlDataSource component uses standard ADO.NET object and the installed on the machine data providers to establish a connection to the specified database and retrieve data. As a result there is returned a single table, even if the SQL query has multiple select statements.

    To get all tables, you can:

    • Create a custom data retrieval method in which to execute the SQL query and load the data in a DataSet. Then using an ObjectDataSource component wrap the DataSet (you will still be able to use only a single DataTable from it).
    • Create a custom business object describing the database objects and their relations and load the data in the model. Then you can use an ObjectDataSource, where relations between objects will allow you to utilize better the data with a single data source component; Or use an OpenAccessDataSource/ EntityDataSource component if the model is built with a specific framework.

    An example of the benefits of using models is the data-binding approach described in the How to Databind to Collection Properties KB and How to use the ReportItem.DataObject property in expressions help articles.

    To use the above components in the Standalone Designer tool, you will have to extend its configuration per the Extending Report Designer article (check the linked resources at the bottom of the article as well).

    In case the stored procedure returns a single table, and its fields are not listed in the Data Explorer, please check if the following KB article applies to your scenario: How to configure Stored Procedure with Temporary Tables for use with SqlDataSource component.

    If you need further help, please let us continue the discussion in one of the threads to keep a better track on the exchanged information.

    Thank you for your understanding.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
  4. Mosaix
    Mosaix avatar
    2 posts
    Member since:
    Oct 2014

    Posted 28 Oct 2014 Link to this post

    This corrected the issue, it was the double data sources, one for the report itself and one for the chart.

    Deleting the one for the report corrected the duplicate charts.

Back to Top