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

Pie chart per group level

4 Answers 246 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jennifer
Top achievements
Rank 1
Jennifer asked on 26 Mar 2013, 06:25 PM
I am testing the ability to have the same chart (i.e. pie or bar) display summary data per group level.

For example, I want to display the gender percentages by Agency, then by Site, then by Class.  I have created a report with groups on each of these values.  However, the pie charts that I created show the same data on each level.  I have one SQL database datasource that provides the values.  I am using the Report Designer for Reporting Q1 2013

I am new to this and would appreciate any help.

Thanks,
Jennifer

4 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 29 Mar 2013, 02:36 PM
Hi Jennifer,

It seems that you are using two data sources, one for your report and a separate one for your graph. Because of that your data will not be grouped automatically since the Graph is taking its data separately, from another data source. In order your data to be grouped according to the parent group you will have to add a data source binding which will look like this:

DataSource                =ReportItem.DataObject

This way you will take data only from your current group and you will still have design time support (have in mind that since the binding is dynamic you will not be able to preview the data/have proper support only with a binding).

I hope that helps.

Kind regards,
IvanY
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

0
Jennifer
Top achievements
Rank 1
answered on 29 Mar 2013, 03:03 PM
Ivan,

Thank you for responding. 

I may have misread your response.  Should I create a datasource for each level that I am grouping?

I actually only have one SQL data source that is pulling all of the records. I selected and grouped the data using the report wizard.  I have placed the pie chart in each group pointing to the same SQL data source.  The result is that the pie charts show detail leve results in each group level rather than group level results.

I created this test report using the stand alone Telerik Reporting software.  Would it be different if I were creating this report though Visual Studio 2010 and using VB code?

Thanks,
Jennifer
0
IvanY
Telerik team
answered on 01 Apr 2013, 12:11 PM
Hi Jennifer,

There would be no difference if you are creating your report with Visual Studio or with the Report Designer.

Regarding your scenario - as stated in the previous ticket all you have to do is to set the data source of the Graph via binding to ReportItem.DataObject.

Another option would be to add a filter for the graph with this expression (but there will be no design time support):
=Fields.City           =                = ReportItem.DataObject.City

Also please have in mind that your graph has to be in the header or the footer of the group so that it is not repeated for each record in the group.

I have attached a sample showing the two possible options.

Kind regards,
IvanY
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

0
Jennifer
Top achievements
Rank 1
answered on 09 Apr 2013, 04:07 PM
IvanY,

I used the "Filter" method and it works!  Thank you for getting me past this obsticle.  By the way... Do you have a VB version of the solution you sent in the zip file?

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