Custom reports - Group data just for the chart


Hi everybody,
Is there a way to configure a custom report (even with a custom datasource adapter) in order to group the data shown in the table before sending them to the chart?

What I’d like to have is a custom report which shows a list of products with their workflow statuses in the table and a pie chart which shows the same data but grouped by their status.
So ungrouped data for the table (in order to have one line per product) and grouped data for the chart (in order to have a “by status” representation of the products).