Anyone here familiar with Jasper Reports iReport?
I am fairly new to it, I am trying to create a report with two pie charts
The data source is
---------
select COUNT(*) as ROWCOUNT, WORKSTREAM, REASON
from TABLENAME where RECORDTYPE = 'Y'
and DATESTAMP BETWEEN $P{FromDate} AND $P{ToDate}
group by WORKSTREAM, REASON
----------
I am trying to get first pie chart to count WORKSTREAM value and %
and the second on the same page to display REASON value and %
One pie chart always displays correctly the other doesn't
1 Answer:
My assumption for your example is, that you cannot do a group by query like you do it. Should there be a count(*) for workstream, and a count(*) for reason?
I would advise to use two datasets (right-click report root in Report Navigator and select "Add dataset"...) with two single queries and connect them to your pie chart. That should be a clear, clean and easy approach.
Cheers, Thomas
P.S.: To increase reusabilty (if it makes sense in your context), you could also implement each pie in a simple subreport...
Thanks, the sub data set worked great. The only problem I am having now is that the labels wont display as %. In designer mode it shows as set to % using {2} but when I preview the report the label names are still on the pie chart.