Charts with Filtered Data

Stimulsoft Reports.NET discussion
Post Reply
pauljza
Posts: 18
Joined: Mon Dec 08, 2008 3:04 am
Location: South Africa

Charts with Filtered Data

Post by pauljza »

I'm trying to create a report with grouping that also includes three pie charts in the group footer. The layout I'm trying to achieve is this:

Group Header (Expression={IDCol}{YearCol})
Detail band
Group Footer with sum totals of Detail band and three pie charts related to Detail band

What I did was create the charts and set their Data Sources to the same as the Detail band. This worked but I got the same charts for all footers.
Then I realized it was filtering that I needed so I created two variables in the code and set these variables to the current row values in the AfterPrint event of the Detail Band so that they matched the Grouping. Then, I set filters on the chart data sources to filter the chart data based on these two variables. This worked but it appears that once the chart filtering is complete the report data is filtered as well.

Is there a different/better way to create this type of report?

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Charts with Filtered Data

Post by Edward »

Hi,
pauljza wrote:I'm trying to create a report with grouping that also includes three pie charts in the group footer. The layout I'm trying to achieve is this:

Group Header (Expression={IDCol}{YearCol})
Detail band
Group Footer with sum totals of Detail band and three pie charts related to Detail band

What I did was create the charts and set their Data Sources to the same as the Detail band. This worked but I got the same charts for all footers.
Then I realized it was filtering that I needed so I created two variables in the code and set these variables to the current row values in the AfterPrint event of the Detail Band so that they matched the Grouping. Then, I set filters on the chart data sources to filter the chart data based on these two variables. This worked but it appears that once the chart filtering is complete the report data is filtered as well.

Is there a different/better way to create this type of report?
In this case you need to create a Master-Detail type of report.

GroupHeader only sorts the data and all rows of the DataSource are visible for the chart. So please use Master-Detail type of the relation between two Datasources: Master source and Detail source.

Thank you.
Post Reply