Question

I've tried to use chart in iReport for the first time. I've used a bar chart and anytime I preview the chart I see plenty of them, iIthink about 6. I only need a single one is there anything that I didn't do?
I have a query like this :

SELECT COUNT(*) AS total_message, `status`, DATE_FORMAT(date_created,'%M') AS `month` FROM message WHERE YEAR(date_created)=$P{year} GROUP BY `status`, MONTH(date_created) ORDER BY `status` DESC

and I have a result like

|total message | status | month       |
|1             | FAILED | January     |
|10            | SENT   | Febuary     |
|11            | SENT   | March       |
|123           | SENT   | April       |
|156           | FAILED | May         |
 ..........

up to december.

My serie expression is set to ${Status}

categorie expression is ${month}

value expression is ${total_message}

Can somebody help me? thanks for reading this!

Was it helpful?

Solution

You didn't provide any code, but I have a guess: you have put the chart in the details band, and you are printing it for each record in your DataSource. Put the chart in a non-repeatable band.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top