English 中文(简体)
How to prevent duplication of bar chart in iReport
原标题:

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!

最佳回答

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.

问题回答

暂无回答




相关问题
Can t find bundle for base name

I m using a library that has a dependency on jfreechart (v 1.0.9). When I try to run the .jar, I get: java.util.MissingResourceException: Can t find bundle for base name org.jfree.chart....

How to prevent duplication of bar chart in iReport

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

Width of the bar in Jfreechart

Is there a way to adjust the width of the bars in a Barchart? I create my chart with the following code. final JFreeChart chart = ChartFactory.createBarChart("Report", // chart title ...

How to handle mouse dragging event in JFreeChart

I want to know whether it is possible to listen to the mouse event of dragging in JFreeCharts. By default it is assign to zooming. I remove this zooming functionality with, chartPanel....

JFreeChart in scrollpane

I m having a big graph created with jfreechart. This chart is too big for the screen, so I would like to put it in a scrollpane. However, when using the scrollbar, the complete graph is redrawn ...

JFreeChart connecting points in stacked bar charts

I created a stacked bar chart using JFreeChart (similar to this one). Now I would like to connect the points of the corresponding series for all rows. Is this possible using JFreeChart?

热门标签