ben.rattigan Posted June 28, 2013 Share Posted June 28, 2013 Anyone here familiar with Jasper Reports iReport?I am fairly new to it, I am trying to create a report with two pie chartsThe data source is---------select COUNT(*) as ROWCOUNT, WORKSTREAM, REASONfrom 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 Link to comment Share on other sites More sharing options...
Solution Thomas Zimmer Posted June 30, 2013 Solution Share Posted June 30, 2013 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, Thomashttp://www.thomaszimmer.netP.S.: To increase reusabilty (if it makes sense in your context), you could also implement each pie in a simple subreport... Link to comment Share on other sites More sharing options...
ben.rattigan Posted July 1, 2013 Author Share Posted July 1, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now