Jump to content
Changes to the Jaspersoft community edition download ×

Help needed to build a correct stacked bar graph


kduan

Recommended Posts

I would like to create a stacked bar chart to report a country's total order amount on a product. I created a report using iReport as follows:

 

The Repor Query is:

"Select country, product, sum(order_amount) From country_product_order Group By country, product"

It returns the total order amount on each product

by each country.

 

The definition on the Category series for the stacked bar chart is as follow:

Series expression: $F{product}

Category expression: $F{country}

Value expression: $F{sum(order_amount)}

Label expression: ""+$F{sum(order_amount)}

 

The two Report Groups defeined for the report are:

"GroupCountry" with an expression $F{country}

"GroupProduct" with an expression $F{product}

 

The resultant report contains 12 exactly identical stacked bar graphs, one for each country-product group. Note that the result set from the query contains 4 countries and 3 products and thus 12 contry-product groups.

 

However, what I need in the report is just one of these 12 bar graphs!

 

Can some help me to figure out how to do it? Thanks.

I am using iReport1.2.8 and JasperReport1.2.8.

 

kevin

Post edited by: kduan, at: 2006/12/12 15:04

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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