Jump to content
Changes to the Jaspersoft community edition download ×

ben.rattigan
Go to solution Solved by Thomas Zimmer,

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

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

http://www.thomaszimmer.net

P.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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...